Skip to content

Commit

Permalink
Remove unused monkeypatches (#9865)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Nov 12, 2023
1 parent 1fb0d8a commit 08fcf8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_fernet.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_timestamp_ignored_no_ttl(self, monkeypatch, backend):
monkeypatch.setattr(time, "time", pretend.raiser(ValueError))
assert f.decrypt(token, ttl=None) == pt

def test_ttl_required_in_decrypt_at_time(self, monkeypatch, backend):
def test_ttl_required_in_decrypt_at_time(self, backend):
f = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend)
pt = b"encrypt me"
token = f.encrypt(pt)
Expand All @@ -148,7 +148,7 @@ def test_bad_key(self, backend, key):
with pytest.raises(ValueError):
Fernet(key, backend=backend)

def test_extract_timestamp(self, monkeypatch, backend):
def test_extract_timestamp(self, backend):
f = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend)
current_time = 1526138327
token = f.encrypt_at_time(b"encrypt me", current_time)
Expand Down Expand Up @@ -250,7 +250,7 @@ def test_rotate_str(self, backend):
with pytest.raises(InvalidToken):
mf1.decrypt(rotated)

def test_rotate_preserves_timestamp(self, backend, monkeypatch):
def test_rotate_preserves_timestamp(self, backend):
f1 = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend)
f2 = Fernet(base64.urlsafe_b64encode(b"\x01" * 32), backend=backend)

Expand Down

0 comments on commit 08fcf8e

Please sign in to comment.