def test_DownloadGameWithSpecialCharactersReturnsResults(self): """GiantBomb doesn't handle searching games with special characters well, so we need to strip any suffix metadata from the gamename before we search""" scraper = GiantBomb_Scraper() results = scraper.search("Super Mario World (USA)", "SNES") print "{0}".format(results) self.assertTrue(len(results) > 0, "Expected more than 1 result for Super Mario World")
def test_DownloadGameWithSpecialCharactersReturnsResults(self): """GiantBomb doesn't handle searching games with special characters well, so we need to strip any suffix metadata from the gamename before we search""" scraper = GiantBomb_Scraper() results = scraper.search("Super Mario World (USA)", "SNES") print("{0}".format(results)) self.assertTrue( len(results) > 0, "Expected more than 1 result for Super Mario World")
def test_search_release(self): responses.add(responses.GET, 'https://www.giantbomb.com/api/releases?filter=platform%3A22%2Cname%3AWip3out&api_key=279442d60999f92c5e5f693b4d23bd3b6fd8e868&field_list=id%2Cguid%2Cname%2Crelease_date&format=json', json=self._loadJsonFromFile('giantbomb_getreleaselist.json'), status=200) scraper = GiantBomb_Scraper() result = scraper.search('Wip3out', 'PlayStation') self.assertEquals(result[0]['title'], 'Wip3out') self.assertEquals(result[0]['id'], '3050-80827')
def test_search_release(self): responses.add(responses.GET, 'https://www.giantbomb.com/api/releases?filter=platform%3A22%2Cname%3AWip&api_key=279442d60999f92c5e5f693b4d23bd3b6fd8e868&field_list=id%2Cguid%2Cname%2Crelease_date&format=json', json=self._loadJsonFromFile('giantbomb_getreleaselist.json'), status=200) scraper = GiantBomb_Scraper() result = scraper.search('Wip3out', 'PlayStation') self.assertEquals(result[0]['title'], 'Wip3out') self.assertEquals(result[0]['id'], '3050-80827')