Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused monkeypatches #9865

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading