class TestFeed(TestCase): def setUp(self): options = {"url": "http://www.gravatar.com/avatar/0?d=mm"} self.connection = Camera(options) self.camera = Feed(options, self.connection) def test_get_url(self): """ Test that the url of the image is returned. """ self.assertEqual(self.camera.get_url(), "http://www.gravatar.com/avatar/0?d=mm") def tearDown(self): """ Clean up by removing the test image that was downloaded. """ if os.path.exists(self.connection.cache_directory): shutil.rmtree(self.connection.cache_directory)
class TestFeed(TestCase): def setUp(self): options = { "url": "http://www.gravatar.com/avatar/0?d=mm" } self.connection = Camera(options) self.camera = Feed(options, self.connection) def test_get_url(self): """ Test that the url of the image is returned. """ self.assertEqual( self.camera.get_url(), "http://www.gravatar.com/avatar/0?d=mm" ) def tearDown(self): """ Clean up by removing the test image that was downloaded. """ if os.path.exists(self.connection.cache_directory): shutil.rmtree(self.connection.cache_directory)
def setUp(self): options = { "url": "http://www.gravatar.com/avatar/0?d=mm" } self.connection = Camera(options) self.camera = Feed(options, self.connection)
def setUp(self): options = {"url": "http://www.gravatar.com/avatar/0?d=mm"} self.connection = Camera(options) self.camera = Feed(options, self.connection)