def test_record_extensions_fake(self): """This should fail, the hostname isn't real.""" task = RecordExtensionsTask() with self.assertRaises(Exception): task.run(666, 'Fake site', 'http://foo.bar.com/')
def test_record_extensions_fake(self): """This should fail, the hostname isn't real.""" task = RecordExtensionsTask() with self.assertRaises(Exception): task.run(666, 'Fake site', 'http://foo.bar.com/')
def test_record_extensions(self): """This should succeed, getting extensions from WikiApiary.""" task = RecordExtensionsTask() retval = task.run(18, 'WikiApiary', 'https://wikiapiary.com/w/api.php') if 'edit' not in retval: raise Exception(retval)
def test_record_extensions(self): """This should succeed, getting extensions from WikiApiary.""" task = RecordExtensionsTask() retval = task.run(18, 'WikiApiary', 'https://wikiapiary.com/w/api.php') if 'edit' not in retval: raise Exception(retval)