mirror of https://github.com/scrapy/scrapy.git
Fix dupe spider name warning string tests
This commit is contained in:
parent
a017f7b932
commit
978306a223
|
|
@ -127,7 +127,7 @@ class DuplicateSpiderNameLoaderTest(unittest.TestCase):
|
|||
spider_loader = SpiderLoader.from_settings(self.settings)
|
||||
|
||||
self.assertEqual(len(w), 1)
|
||||
self.assertIn("several spiders with the same name (spider3)", str(w[0].message))
|
||||
self.assertIn("several spiders with the same name 'spider3'", str(w[0].message))
|
||||
|
||||
spiders = set(spider_loader.list())
|
||||
self.assertEqual(spiders, set(['spider1', 'spider2', 'spider3', 'spider4']))
|
||||
|
|
@ -145,8 +145,8 @@ class DuplicateSpiderNameLoaderTest(unittest.TestCase):
|
|||
|
||||
self.assertEqual(len(w), 2)
|
||||
msgs = sorted(str(wrn.message) for wrn in w)
|
||||
self.assertIn("several spiders with the same name (spider1)", msgs[0])
|
||||
self.assertIn("several spiders with the same name (spider2)", msgs[1])
|
||||
self.assertIn("several spiders with the same name 'spider1'", msgs[0])
|
||||
self.assertIn("several spiders with the same name 'spider2'", msgs[1])
|
||||
|
||||
spiders = set(spider_loader.list())
|
||||
self.assertEqual(spiders, set(['spider1', 'spider2', 'spider3', 'spider4']))
|
||||
|
|
|
|||
Loading…
Reference in New Issue