Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Commit

Permalink
fix empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored Jul 18, 2022
1 parent f423bcb commit 72a56b0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/test_internals/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
LOGGED_INTO_GLOBUS = False
except ModuleNotFoundError:
HAVE_GLOBUS, LOGGED_INTO_GLOBUS = False, False

print("here - 1")
print(os.environ)
HAVE_DANDI_KEY = os.getenv("DANDI_API_KEY") is not None # "DANDI_API_KEY" in os.environ
DANDI_API_KEY = os.getenv("DANDI_API_KEY")
HAVE_DANDI_KEY = DANDI_API_KEY is not None and DANDI_API_KEY != "" # can be "" from external forks


class TestConversionTools(TestCase):
Expand Down Expand Up @@ -176,6 +174,10 @@ def test_estimate_total_conversion_runtime():
]


@pytest.mark.skipif(
not HAVE_DANDI_KEY,
reason="You must set your DANDI_API_KEY to run this test!",
)
class TestAutomaticDANDIUpload(TestCase):
def setUp(self):
self.tmpdir = Path(mkdtemp())
Expand All @@ -190,16 +192,14 @@ def setUp(self):
def tearDown(self):
rmtree(self.tmpdir)

@unittest.skipIf(
not HAVE_DANDI_KEY,
reason="You must set your DANDI_API_KEY to run this test!",
)
def test_automatic_dandi_upload(self):
print("here - 2")
print(os.environ)
automatic_dandi_upload(dandiset_id="200560", nwb_folder_path=self.nwb_folder_path, staging=True)


@pytest.mark.skipif(
not (HAVE_GLOBUS and LOGGED_INTO_GLOBUS),
reason="You must have globus installed and be logged in to run this test!",
)
class TestGlobusTransferContent(TestCase):
def setUp(self):
self.tmpdir = Path(mkdtemp()) # Globus has permission issues here apparently
Expand Down

0 comments on commit 72a56b0

Please sign in to comment.