def test_get_show_links(self): api = PhishNetAPI() show_links_response = api.get_show_links(1394573037) assert show_links_response['error_code'] == 0 assert show_links_response['response']['count'] == len( show_links_response['response']['data'])
def test_get_show_links(self, requests_mock): api = PhishNetAPI('apikey123456789test1') with open('tests/data/get_show_links.json') as f: get_show_links_json = json.load(f) requests_mock.post(api.base_url + "shows/links", json=get_show_links_json) show_links_response = api.get_show_links(1394573037) assert show_links_response['response']['count'] == 4 assert len(show_links_response['response']['data']) == 4 assert show_links_response['response']['data'][0]['type'] == "Photos"