generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
15 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ def test_work_order_token(): | |
user_id="some-user-id", | ||
user_public_crypt4gh_key="some-public-key", | ||
full_user_name="Dr. John Doe", | ||
email="[email protected]", # pyright: ignore | ||
email="[email protected]", # type: ignore | ||
) | ||
assert token.full_user_name == "Dr. John Doe" | ||
|
||
|
@@ -78,23 +78,23 @@ def test_bad_creation_data(): | |
"""Test instantiating invalid work package creation DTO.""" | ||
with raises(ValidationError, match="dataset_id"): | ||
WorkPackageCreationData( | ||
dataset_id=["foo", "bar"], # pyright: ignore | ||
dataset_id=["foo", "bar"], # type: ignore | ||
type=WorkType.DOWNLOAD, | ||
file_ids=["some-file-id", "another-file-id"], | ||
user_public_crypt4gh_key=user_public_crypt4gh_key, | ||
) | ||
with raises(ValidationError, match="type"): | ||
WorkPackageCreationData( | ||
dataset_id="some-dataset-id", | ||
type="UNKNOWN_TYPE", # pyright: ignore | ||
type="UNKNOWN_TYPE", # type: ignore | ||
file_ids=["some-file-id", "another-file-id"], | ||
user_public_crypt4gh_key=user_public_crypt4gh_key, | ||
) | ||
with raises(ValidationError, match="file_ids"): | ||
WorkPackageCreationData( | ||
dataset_id="some-dataset-id", | ||
type=WorkType.DOWNLOAD, | ||
file_ids="some-file-id", # pyright: ignore | ||
file_ids="some-file-id", # type: ignore | ||
user_public_crypt4gh_key=user_public_crypt4gh_key, | ||
) | ||
with raises(ValidationError, match="user_public_crypt4gh_key"): | ||
|
@@ -116,7 +116,7 @@ def test_work_package(): | |
files={"some-file-id": ".sam", "another-file-id": ".bam"}, | ||
user_public_crypt4gh_key=user_public_crypt4gh_key, | ||
full_user_name="Dr. John Doe", | ||
email="[email protected]", # pyright: ignore | ||
email="[email protected]", # type: ignore | ||
token_hash="308eda9daf26b7446b284449a5895ab9a04ff30c129d4454e471cfb81bf5557d", | ||
created=datetime(2022, 2, 2, 2, tzinfo=timezone.utc), # pyright: ignore | ||
expires=datetime(2022, 2, 2, 3, tzinfo=timezone.utc), # pyright: ignore | ||
|
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 |
---|---|---|
|
@@ -64,7 +64,7 @@ def test_sign_work_order_token(): | |
user_id="some-user-id", | ||
user_public_crypt4gh_key="some-public-key", | ||
full_user_name="Dr. John Doe", | ||
email="[email protected]", # pyright: ignore | ||
email="[email protected]", # type: ignore | ||
) | ||
token_str = sign_work_order_token(work_order_token=work_order_token, key=key) | ||
assert isinstance(token_str, str) | ||
|