Exemple #1
0
 def test_store(self):
     out = BytesIO()
     storage = StdoutFeedStorage('stdout:', _stdout=out)
     file = storage.open(scrapy.Spider("default"))
     file.write(b"content")
     yield storage.store(file)
     self.assertEqual(out.getvalue(), b"content")
Exemple #2
0
 def test_store(self):
     out = BytesIO()
     storage = StdoutFeedStorage('stdout:', _stdout=out)
     file = storage.open(scrapy.Spider("default"))
     file.write(b"content")
     yield storage.store(file)
     self.assertEqual(out.getvalue(), b"content")