You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=================================== FAILURES ===================================
__________________________ test_ingest_to_graph_valid __________________________
client = <FlaskClient <Flask 'data_importer_app'>>
def test_ingest_to_graph_valid(client):
"""Add test for ingest to graph API when some key is missing."""
input_data = [
{
"ecosystem": "maven",
"name": "commons-collections:commons-collections",
"source_repo": "redhat_maven"
}
]
url = url_for('api_v1.ingest_to_graph')
response = client.post(url,
data=json.dumps(input_data),
headers={'Content-Type': 'application/json'})
# we expect that the HTTP code will be 400/Bad Request
assert response.status_code == 400
data = json.loads(response.get_data().decode('utf-8'))
epv_keys = input_data[0].keys()
> assert data['message'] == 'Invalid keys found in input: ' + ','.join(epv_keys)
E AssertionError: assert 'Invalid keys...m,source_repo' == 'Invalid keys ...cosystem,name'
E - Invalid keys found in input: name,ecosystem,source_repo
E ? ^^^ ^^^^^ -----
E + Invalid keys found in input: source_repo,ecosystem,name
E ? ^^^^^ +++++ ^^^
test/test_rest_api.py:122: AssertionError
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: