-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Shubham Gupta <[email protected]>
- Loading branch information
1 parent
8482d51
commit 4f06ec1
Showing
7 changed files
with
23 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ def test_api_cache_invalidation_login(root_verify_key, worker): | |
assert guest_client.register( | ||
name="q", email="[email protected]", password="aaa", password_verify="aaa" | ||
) | ||
guest_client.login(email="[email protected]", password="aaa") | ||
guest_client = guest_client.login(email="[email protected]", password="aaa") | ||
user_id = worker.document_store.partitions["User"].all(root_verify_key).value[-1].id | ||
|
||
def get_role(verify_key): | ||
|
@@ -75,6 +75,6 @@ def get_role(verify_key): | |
|
||
assert get_role(guest_client.credentials.verify_key) == ServiceRole.DATA_OWNER | ||
|
||
guest_client.login(email="[email protected]", password="aaa") | ||
guest_client = guest_client.login(email="[email protected]", password="aaa") | ||
|
||
assert guest_client.upload_dataset(dataset) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,16 @@ def test_client_logged_in_user(worker): | |
guest_client = worker.guest_client | ||
assert guest_client.logged_in_user == "" | ||
|
||
guest_client.login(email="[email protected]", password="changethis") | ||
assert guest_client.logged_in_user == "[email protected]" | ||
client = guest_client.login(email="[email protected]", password="changethis") | ||
assert client.logged_in_user == "[email protected]" | ||
|
||
guest_client.register( | ||
client.register( | ||
name="sheldon", | ||
email="[email protected]", | ||
password="bazinga", | ||
password_verify="bazinga", | ||
) | ||
|
||
guest_client.login(email="[email protected]", password="bazinga") | ||
client = client.login(email="[email protected]", password="bazinga") | ||
|
||
assert guest_client.logged_in_user == "[email protected]" | ||
assert client.logged_in_user == "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,8 +76,12 @@ def test_domain_connect_to_gateway(faker: Faker): | |
assert proxy_domain_client.metadata == domain_client.metadata | ||
assert proxy_domain_client.user_role == ServiceRole.NONE | ||
|
||
domain_client.login(email="[email protected]", password="changethis") | ||
proxy_domain_client.login(email="[email protected]", password="changethis") | ||
domain_client = domain_client.login( | ||
email="[email protected]", password="changethis" | ||
) | ||
proxy_domain_client = proxy_domain_client.login( | ||
email="[email protected]", password="changethis" | ||
) | ||
|
||
assert proxy_domain_client.logged_in_user == "[email protected]" | ||
assert proxy_domain_client.user_role == ServiceRole.ADMIN | ||
|
@@ -129,8 +133,10 @@ def test_enclave_connect_to_gateway(faker: Faker): | |
password_verify=password, | ||
) | ||
|
||
enclave_client.login(email=user_email, password=password) | ||
proxy_enclave_client.login(email=user_email, password=password) | ||
enclave_client = enclave_client.login(email=user_email, password=password) | ||
proxy_enclave_client = proxy_enclave_client.login( | ||
email=user_email, password=password | ||
) | ||
|
||
assert proxy_enclave_client.logged_in_user == user_email | ||
assert proxy_enclave_client.user_role == enclave_client.user_role | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters