···4747 self.assertGreater(len(requests), 0)
4848 self.assertIsInstance(requests[0], Request)
49495050-5150 def test_synonym_requests(self):
5251 # A test for the synonym request function
5352 self.spi._sources = []
+1-4
utils/configurator.py
···1212 def __init__(self):
1313 self.scrapy_settings = get_project_settings()
14141515-1615 def set_output(self, filename, fileformat):
1716 """
1817 This function manipulates the Scrapy output file settings that normally would be set in the settings file.
···30293130 if fileformat is not None:
3231 self.scrapy_settings.overrides["FEED_FORMAT"] = fileformat
3333-34323533 def set_logging(self, logfile=None, verbose=0):
3634 """
···6159 else:
6260 self.scrapy_settings.overrides["LOG_FILE"] = None
63616464-6562 @staticmethod
6663 def read_sourceconfiguration():
6764 """
···7067 :return a ConfigParser object of sources.cfg
7168 """
7269 config = ConfigParser.ConfigParser()
7373- config.read('sources.cfg') # [TODO]: should be softcoded eventually
7070+ config.read('sources.cfg') # [TODO]: should be softcoded eventually
7471 return config
75727673 @staticmethod