Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Yusuf Zainee committed Jul 2, 2019
1 parent 974f09f commit 08b0140
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def sync_data():
or latest version or both.
valid input: {
"non_cve_sync": True / False,
"latest_version_sync": True / false,
"non_cve_sync": true/false,
"latest_version_sync": true/false,
"cve_ecosystem": ['maven', 'pypi, 'npm']
}
Expand Down
10 changes: 5 additions & 5 deletions tests/test_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_sync_data1(_mock1, client):
url = api_route_for("sync-graph-data")
inp = '''{
"non_cve_sync": true,
"latest_version_sync": "true",
"latest_version_sync": true,
"cve_ecosystem": ["npm"]
}'''
response = client.post(url,
Expand All @@ -169,17 +169,17 @@ def test_sync_data1(_mock1, client):
assert response.status_code == 200

inp = '''{
"non_cve_sync": "true",
"latest_version_sync": "true"
"non_cve_sync": true,
"latest_version_sync": true
}'''
response = client.post(url,
data=inp,
content_type='application/json')
assert response.status_code == 400

inp = '''{
"non_cve_sync": "true",
"latest_version_sync": "true",
"non_cve_sync": true,
"latest_version_sync": true,
"cve_ecosystem": ["npm"]
}'''
response = client.post(url,
Expand Down

0 comments on commit 08b0140

Please sign in to comment.