-
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
1 parent
89f7e91
commit bea964e
Showing
2 changed files
with
6 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ def test_get_all_corpus_types( | |
assert len(data) == EXPECTED_NUM_CORPORA | ||
for item in data: | ||
assert isinstance(item, dict) | ||
assert all(key in ["name", "description", "valid_metadata"] for key in item) | ||
assert all(key in ["name", "description", "metadata"] for key in item) | ||
|
||
# Check Laws and Policies content. | ||
laws_and_policies_ct = data[0] | ||
|
@@ -35,7 +35,7 @@ def test_get_all_corpus_types( | |
laws_and_policies_ct["description"] | ||
== EXPECTED_CCLW_CORPUS["corpus_type_description"] | ||
) | ||
assert laws_and_policies_ct["valid_metadata"] is not None | ||
assert laws_and_policies_ct["metadata"] is not None | ||
assert isinstance(laws_and_policies_ct["valid_metadata"], dict) | ||
|
||
# Check Intl. Agreements content. | ||
|
@@ -46,7 +46,7 @@ def test_get_all_corpus_types( | |
== EXPECTED_UNFCCC_CORPUS["corpus_type_description"] | ||
) | ||
|
||
assert int_agreements_ct["valid_metadata"] is not None | ||
assert int_agreements_ct["metadata"] is not None | ||
assert isinstance(int_agreements_ct["valid_metadata"], dict) | ||
|
||
|
||
|
@@ -60,7 +60,7 @@ def test_get_all_corpus_types_non_super( | |
) | ||
assert response.status_code == status.HTTP_403_FORBIDDEN | ||
data = response.json() | ||
assert data["detail"] == "User [email protected] is not authorised to READ a CORPUS TYPE" | ||
assert data["detail"] == "User [email protected] is not authorised to READ a CORPUS_TYPE" | ||
|
||
|
||
def test_get_all_corpus_types_when_not_authenticated( | ||
|
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