Skip to content

Commit

Permalink
Fix api key test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jongmassey committed Feb 18, 2025
1 parent bb5d6d5 commit b71bd51
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions opencodelists/tests/integration/test_sanitise_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def test_api_keys_removed(self, universe, tmp_path):
original_users = [v for v in universe.values() if isinstance(v, User)]
api_tokens = {u.api_token for u in original_users if u.api_token}

# other tests may modify the api_tokens in the db, so save the in-memory users to db.
for u in original_users:
u.save()

backup_path = backup_db(tmp_path)
sanitise_backup(backup_path)

Expand Down

0 comments on commit b71bd51

Please sign in to comment.