Skip to content

Commit

Permalink
undo changes to troubleshoot build
Browse files Browse the repository at this point in the history
  • Loading branch information
rwegener2 committed Aug 14, 2023
1 parent e06765a commit 9e1f745
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion icepyx/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ def test_login_function(auth_instance):
def test_depreciation_warning(auth_instance):
with pytest.warns(DeprecationWarning):
auth_instance.earthdata_login(email='[email protected]')

11 changes: 9 additions & 2 deletions icepyx/tests/test_behind_NSIDC_API_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ def reg():

@pytest.fixture(scope="module")
def session(reg):
ed_obj = reg.session
# append to netrc file and set permissions level
args = ("icepyx_devteam", "urs.earthdata.nasa.gov", os.getenv("NSIDC_LOGIN"))
netrc_file = os.path.join(os.path.expanduser("~"), ".netrc")
with open(netrc_file, "a+") as f:
f.write("machine {1} login {0} password {2}\n".format(*args))
os.chmod(netrc_file, 0o600)

ed_obj = reg._session
yield ed_obj
ed_obj.close()

Expand All @@ -42,7 +49,7 @@ def test_get_custom_options_output(session):
# NOTE: best this test can do at the moment is a successful download with no errors...
def test_download_granules_with_subsetting(reg, session):
path = "./downloads_subset"
reg.session = session
reg._session = session
reg.order_granules()
reg.download_granules(path)

Expand Down

0 comments on commit 9e1f745

Please sign in to comment.