def test_record_skins_fake(self): """Get skins from fake website.""" task = RecordSkinsTask() with self.assertRaises(Exception): task.run(666, 'Fake site', 'http://foo.bar.com/')
def test_record_skins(self): """Get skins from WikiApiary.""" task = RecordSkinsTask() retval = task.run(18, 'WikiApiary', 'https://wikiapiary.com/w/api.php') if 'edit' not in retval: raise Exception(retval)