def test_nonexisting_site_id(): site_id = V.nonexisting_site_id r = requests.get(api_url + f"/sites/{site_id}", headers=auth_header) assert_invalid_response(r) r = requests.get(api_url + f"/sites/{site_id}/article_count", headers=auth_header) assert_invalid_response(r) r = requests.get(api_url + f"/sites/{site_id}/latest_article", headers=auth_header) assert_invalid_response(r)
def test_invalid_date(): date = V.invalid_date r = requests.get(api_url + f"/stats?date={date}", headers=auth_header) assert_invalid_response(r)
def test_nonexisting_urls(): urls = V.nonexisting_urls for u in urls: r = requests.get(api_url + f"/articles?url={u}", headers=auth_header) assert_invalid_response(r)
def test_date_without_stats(): date = V.date_without_stats r = requests.get(api_url + f"/stats?date={date}", headers=auth_header) assert_invalid_response(r)
def test_nonexisting_id(): article_id = V.nonexisting_article_id r = requests.get(api_url + f"/articles/{article_id}", headers=auth_header) assert_invalid_response(r)