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_queue_to_parse(self):
        singleton = Singleton()
        idt = ImageDownloaderThread(1,'Thread',1)

        try:
            idt.run
            idt.traverse_site()
            idt.download_images(idt.name)

        except:
            self.assertRaises(AttributeError)
    def test_singletone_implement_missing_to_visit(self):
        singleton = Singleton()
        singleton.queue_to_parse = ['http://localhost/sample.html']
        idt = ImageDownloaderThread(1,'Thread',1)

        try:
            idt.run
            idt.traverse_site()
            idt.download_images(idt.name)

        except:
            self.assertRaises(AttributeError)