-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #580 from fractal-analytics-platform/579-placehold…
…er-align-with-fractal-server-re-verified-users Align with fractal server (re: verified users)
- Loading branch information
Showing
7 changed files
with
102 additions
and
31 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -182,8 +182,21 @@ async def _job_factory(**job_args_override): | |
first_task_index=9999, | ||
last_task_index=9999, | ||
workflow_dump={}, | ||
input_dataset_dump={}, | ||
output_dataset_dump={}, | ||
input_dataset_dump=dict( | ||
id=1, | ||
name="ds-in", | ||
read_only=False, | ||
project_id=1, | ||
resource_list=[dict(path="/tmp", id=1, dataset_id=1)], | ||
), | ||
output_dataset_dump=dict( | ||
id=2, | ||
name="ds-out", | ||
read_only=False, | ||
project_id=1, | ||
resource_list=[dict(path="/tmp", id=1, dataset_id=2)], | ||
), | ||
project_dump=dict(id=1, name="proj", read_only=True), | ||
start_timestamp=datetime.now(tz=timezone.utc), | ||
user_email="[email protected]", | ||
) | ||
|
@@ -216,20 +229,21 @@ async def __register_user( | |
f"http://localhost:{PORT}/auth/register/", | ||
json=new_user, | ||
) | ||
if res.status_code != 201: | ||
import logging | ||
|
||
logging.error(res.status_code) | ||
logging.error(res.json()) | ||
assert res.status_code == 201 | ||
user_id = res.json()["id"] | ||
# Make user verified via API call | ||
res = await client_superuser.patch( | ||
f"http://localhost:{PORT}/auth/users/{user_id}/", | ||
json=dict(is_verified=True), | ||
) | ||
assert res.status_code == 200 | ||
return res.json() | ||
|
||
return __register_user | ||
|
||
|
||
@pytest.fixture | ||
async def register_user(user_factory, db): | ||
|
||
from fractal_server.app.models import UserOAuth | ||
|
||
created_user = await user_factory( | ||
|
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