Skip to content

Commit

Permalink
using existing fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Nov 9, 2023
1 parent c5da36e commit 1bf53db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,6 @@ def default_token(default_token_payload, secret_key) -> str:
return token


@pytest.fixture
def environment_token_clean_up():
oda_token_cwd_fn = ".oda-token"
if os.path.exists(oda_token_cwd_fn):
os.remove(oda_token_cwd_fn)

home_dir = os.environ.get('HOME', None)
if home_dir is not None:
oda_token_home_fn = os.path.join(home_dir, ".oda-token")
os.remove(oda_token_home_fn)

os.environ.pop('ODA_TOKEN', None)

def remove_scratch_folders(job_id=None):
if job_id is None:
dir_list = glob.glob('scratch_*')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def validate_data(data, scw_kind):
assert len(t) == 1


def test_instruments(environment_token_clean_up):
def test_instruments(remove_any_token_from_environment):
from oda_api.api import DispatcherAPI
disp = DispatcherAPI(
host=get_platform_dispatcher(),
Expand Down

0 comments on commit 1bf53db

Please sign in to comment.