Skip to content
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: 5 additions & 1 deletion tests/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ def _bucket(bucket_id, events=None):


@pytest.fixture()
def cleanup(flask_client):
def cleanup(flask_client, monkeypatch):
ids = []
yield ids
# Fixtures tear down in reverse setup order, so a test listing
# `monkeypatch` before `cleanup` still has e.g. a failing delete_bucket
# patched here; undo first so cleanup can't leak buckets into later tests.
monkeypatch.undo()
buckets = flask_client.get("/api/0/buckets/").json
for bucket_id in ids:
if bucket_id in buckets:
Expand Down
Loading