Skip to content

Commit

Permalink
Convert to monkeypatch.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariacarmina committed Jan 17, 2024
1 parent 21added commit 6874b0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ env =
D:SUBGRAPH_URLS={{"8996": "http://localhost:9000"}}
D:AQUARIUS_URL=http://localhost:5000
D:EVENTS_MONITOR_SLEEP_TIME=10
D:ACCOUNT_PURGATORY_URL=https://raw.githubusercontent.com/oceanprotocol/list-purgatory/main/list-accounts.json
5 changes: 4 additions & 1 deletion tests/test_purgatory.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ def test_purgatory_retrieve_new_list(events_object):
assert purgatory.retrieve_new_list("env") == set()


def test_purgatory_retrieve_account_list(events_object):
def test_purgatory_retrieve_account_list(events_object, monkeypatch):
# set account purgatory filtering for accounts
monkeypatch.setenv('ACCOUNT_PURGATORY_URL', "https://raw.githubusercontent.com/oceanprotocol/list-purgatory/main/list-accounts.json")
purgatory = Purgatory(events_object._es_instance)

result = purgatory.retrieve_new_list("ACCOUNT_PURGATORY_URL")
print(f"result from retrieve new list: {result}")
assert result
Expand Down

0 comments on commit 6874b0f

Please sign in to comment.