Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Sep 2, 2024
1 parent db4c519 commit c220b87
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion backend_py/primary/primary/services/sumo_access/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@


def create_sumo_client(access_token: str) -> SumoClient:
sumo_client = SumoClient(env="prod")
if access_token == "TEST_USER":
access_token = None
sumo_client = SumoClient(env=config.SUMO_ENV, token=access_token, interactive=False)
return sumo_client


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,21 @@
async def test_get_vector_list(test_user, sumo_test_ensemble_ahm):

client = SumoClient(env="prod")
token = client.authenticate()
sumo = Explorer(env="prod")
cases = [case.uuid for case in sumo.cases]
assert "485041ce-ad72-48a3-ac8c-484c0ed95cf8" in cases

token = "TEST_USER"
tokens = AccessTokens(sumo_access_token=token)
user = AuthenticatedUser(user_id="test_user", username="test_user", access_tokens=tokens)
assert user.has_sumo_access_token() == True
assert len(user.get_sumo_access_token()) == 537

sumo = Explorer(env="prod")





cases = [case.uuid for case in sumo.cases]
assert "485041ce-ad72-48a3-ac8c-484c0ed95cf8" in cases
res = client.post("/search", json={})

response = await client.post_async("/search", json={})
Expand Down

0 comments on commit c220b87

Please sign in to comment.