def test_google_query_response_no_result_candidates_key_candidates( mock_response_google_no_result): """ test google query response no result candidates key candidates """ response = Query().query_google_place('aaaaaaaaaaaaaaaaaaaaaaaaa') assert 'candidates' in response.json()
def test_google_query_response_candidates_gt0(mock_response_google_positive): """ test google query response if candidates len > 0 """ response = Query().query_google_place('openclassrooms') assert len(response.json()['candidates']) > 0
def test_google_query_response_key_status(mock_response_google_positive): """ test google query response if key 'status' """ response = Query().query_google_place('openclassrooms') assert 'status' in response.json()
def test_google_query_response_key_status_ok(mock_response_google_positive): """ test google query response if key status is 'OK' """ response = Query().query_google_place('openclassrooms') assert response.json()['status'] == 'OK'
def test_wikimedia_response_extract_is_not_none( mock_response_wikimedia_extracts): """ test wikimedia response extract is not none for '4338589' """ response = Query().query_wikimedia_desciption('4338589') assert response.json() is not None