Exemple #1
0
 def test_interface(self):
     path = self.mktemp()
     st = FileFeedStorage(path)
     verifyObject(IFeedStorage, st)
Exemple #2
0
 def test_store_direct_path_relative(self):
     path = self.mktemp()
     return self._assert_stores(FileFeedStorage(path), path)
Exemple #3
0
 def test_store_direct_path(self):
     path = os.path.abspath(self.mktemp())
     return self._assert_stores(FileFeedStorage(path), path)
Exemple #4
0
 def test_store_file_uri_makedirs(self):
     path = os.path.abspath(self.mktemp())
     path = os.path.join(path, 'more', 'paths', 'file.txt')
     uri = path_to_file_uri(path)
     return self._assert_stores(FileFeedStorage(uri), path)
Exemple #5
0
 def test_store_file_uri(self):
     path = os.path.abspath(self.mktemp())
     uri = path_to_file_uri(path)
     return self._assert_stores(FileFeedStorage(uri), path)
Exemple #6
0
	def open(self, spider):
		try: output_format = spider.output_format
		except AttributeError: output_format = 'csv'
		self.path = self.path + '.' +  output_format
		return FileFeedStorage.open(self, spider)