def test_singletone_implement_run(self): singleton = Singleton() singleton.queue_to_parse = ['http://localhost/sample.html'] singleton.to_visit = set() singleton.downloaded = set() idt = ImageDownloaderThread(1,'Thread',1) idt.traverse_site() idt.run
def test_singletone_implement_missing_downloaded(self): singleton = Singleton() singleton.queue_to_parse = ['http://localhost/sample.html'] singleton.to_visit = set() idt = ImageDownloaderThread(1,'Thread',1) try: idt.run idt.traverse_site() idt.download_images(idt.name) except: self.assertRaises(AttributeError)