예제 #1
0
 def test_success_filled(self) -> None:
     # arrange
     kic = KnownImageCrawlers([])
     kic._list = [('testA', LoadableImageCrawlerA)]
     # act
     kic._test_duplicate_name('testB')
     # assert
     self.assertTrue(True, 'no errors thrown')
예제 #2
0
 def test_raise(self) -> None:
     # arrange
     known_ic_name = 'test'
     kic = KnownImageCrawlers([])
     kic._list = [(known_ic_name, LoadableImageCrawlerA)]
     # act & assert
     with self.assertRaises(KeyError):
         kic._test_duplicate_name(known_ic_name)
예제 #3
0
 def test_success_empty(self) -> None:
     # arrange
     kic = KnownImageCrawlers([])
     kic._list = []
     # act
     kic._test_duplicate_name('test')
     # assert
     self.assertTrue(True, 'no errors thrown')