Skip to content

Commit 1a82af5

Browse files
committed
test docstrings
1 parent 113f4cb commit 1a82af5

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

tests/test_metadata.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ def client():
1111

1212

1313
def test_validate_metadata_with_all_fields(client: FlaskClient):
14+
"""
15+
If both profile name and crate json are provided then processing
16+
of the RO-Crate metadata should continue, and return:
17+
- 200 status code
18+
- JSON data object which includes "status" which is "success"
19+
"""
1420
test_data = {
1521
"crate_json": '{"@context": "https://w3id.org/ro/crate/1.1/context"}',
1622
"profile_name": "default"
@@ -31,9 +37,10 @@ def test_validate_metadata_with_all_fields(client: FlaskClient):
3137

3238
def test_validate_metadata_without_profile_name(client: FlaskClient):
3339
"""
34-
If the profile name is not specified then :
35-
- 422 error
36-
- Error message which includes 'Missing data for required field'
40+
If the profile name is not specified then processing
41+
of the RO-Crate metadata should continue, and return:
42+
- 200 status code
43+
- JSON data object which includes "status" which is "success"
3744
"""
3845
test_data = {
3946
"crate_json": '{"@context": "https://w3id.org/ro/crate/1.1/context"}'
@@ -51,7 +58,7 @@ def test_validate_metadata_without_profile_name(client: FlaskClient):
5158
def test_validate_metadata_missing_crate_json(client: FlaskClient):
5259
"""
5360
If the RO-Crate is missing APIFlask should return:
54-
- 422 error
61+
- 422 status code
5562
- Error message which includes 'Missing data for required field'
5663
"""
5764
test_data = {

0 commit comments

Comments
 (0)