Skip to content

Commit

Permalink
Missed the fact that the username was off and it was still testing th…
Browse files Browse the repository at this point in the history
…e same user in a spot
  • Loading branch information
OrdiNeu committed Dec 18, 2024
1 parent 6a16b96 commit 8e5c3e9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions etc/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ def test_tyk():
## Can we get the correct dataset response for each user?
def user_auth_datasets():
return [
("CANDIG_NOT_ADMIN2", "PROGRAM-2"),
("CANDIG_NOT_ADMIN", "PROGRAM-1"),
("CANDIG_NOT_ADMIN", "TEST_2"),
("CANDIG_NOT_ADMIN2", "SYNTHETIC-2"),
("CANDIG_NOT_ADMIN", "SYNTHETIC-1")
]

def get_katsu_datasets(user):
Expand Down Expand Up @@ -164,7 +163,7 @@ def test_add_remove_program_authorization(user, dataset):

# try adding a user to the program:
test_data = {
"email": user,
"email": ENV[f"{user}_USER"],
"program": dataset
}

Expand All @@ -173,7 +172,7 @@ def test_add_remove_program_authorization(user, dataset):
print(f"{response.json()}, {response.status_code}")
assert response.status_code == 200

assert test_data["program"] in get_katsu_datasets("CANDIG_NOT_ADMIN")
assert test_data["program"] in get_katsu_datasets(user)

# remove the user
response = requests.delete(f"{ENV['CANDIG_URL']}/ingest/program/{test_data['program']}/email/{test_data['email']}", headers=headers)
Expand Down

0 comments on commit 8e5c3e9

Please sign in to comment.