Skip to content

Commit

Permalink
Resolve failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Nov 8, 2024
1 parent fce9ca9 commit 979c076
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 6 additions & 1 deletion dandi/cli/tests/test_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,21 @@ def test_cmd_instances(monkeypatch):
"dandi:\n"
" api: https://api.dandiarchive.org/api\n"
" gui: https://dandiarchive.org\n"
" is_private: null\n"
"dandi-api-local-docker-tests:\n"
f" api: http://{instancehost}:8000/api\n"
f" gui: http://{instancehost}:8085\n"
" is_private: null\n"
"dandi-staging:\n"
" api: https://api-staging.dandiarchive.org/api\n"
" gui: https://gui-staging.dandiarchive.org\n",
" gui: https://gui-staging.dandiarchive.org\n"
" is_private: null\n"
"linc:\n"
" api: https://api.lincbrain.org/api\n"
" gui: https://lincbrain.org\n"
" is_private: true\n"
"linc-staging:\n"
" api: https://staging-api.lincbrain.org/api\n"
" gui: https://staging.lincbrain.org\n"
" is_private: true\n"
)
6 changes: 4 additions & 2 deletions dandi/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from enum import Enum
import os

from typing import Optional

#: A list of metadata fields which dandi extracts from .nwb files.
#: Additional fields (such as ``number_of_*``) might be added by
#: `get_metadata()`
Expand Down Expand Up @@ -100,7 +102,7 @@ class DandiInstance:
name: str
gui: str | None
api: str
is_private: bool = False
is_private: Optional[bool] = None

@property
def redirector(self) -> None:
Expand Down Expand Up @@ -140,7 +142,7 @@ def urls(self) -> Iterator[str]:
is_private=True
),
"linc-staging": DandiInstance(
"linc",
"linc-staging",
"https://staging.lincbrain.org",
"https://staging-api.lincbrain.org/api",
is_private=True
Expand Down
2 changes: 1 addition & 1 deletion dandi/tests/test_dandiarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def test_parse_dandi_url_unknown_instance() -> None:
parse_dandi_url("dandi://not-an-instance/000001")
assert str(excinfo.value) == (
"Unknown instance 'not-an-instance'. Valid instances: dandi,"
" dandi-api-local-docker-tests, dandi-staging"
" dandi-api-local-docker-tests, dandi-staging, linc, linc-staging"
)


Expand Down

0 comments on commit 979c076

Please sign in to comment.