Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions harmony_api/routers/text_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
CacheResponse,
SearchInstrumentsResponse,
)
from harmony.util.url_loader import load_instruments_from_url

from harmony.schemas.enums.clustering_algorithms import ClusteringAlgorithm
from harmony_api import helpers, dependencies, constants
Expand Down Expand Up @@ -435,3 +436,9 @@ def search_instruments(
]

return SearchInstrumentsResponse(instruments=instruments)

@router.get(
path="/get_instruments_from_url", status_code=status.HTTP_200_OK, response_model_exclude_none=True
)
def get_instruments_from_url(url: str) -> List[Instrument]:
return load_instruments_from_url(url)
2 changes: 1 addition & 1 deletion tests/remote_tests/test_match_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
class TestMatch(unittest.TestCase):

def test_gad_7_correct_size_dictionary_response(self):
self.assertEqual(7, len(response.json()))
self.assertEqual(8, len(response.json()))

def test_gad_7_first_question_conserved(self):
self.assertEqual("Feeling nervous, anxious, or on edge", response.json()["questions"][0]["question_text"])
Expand Down