def test_new_instance_copies_the_given_instance(): settings = Settings() new_instance = BaseSettings.object_from(settings) assert new_instance.MAX_NEXT_REQUESTS == 64 assert type(new_instance) == Settings
def test_new_instance_copies_the_given_instance(): settings = Settings() new_instance = BaseSettings.object_from(settings) assert new_instance.MAX_NEXT_REQUESTS == 0 assert type(new_instance) == Settings
def test_object_from_loads_settings_from_a_module(): module = 'tests.scrapy_spider.frontera.settings' settings = BaseSettings.object_from(module) assert settings.get('MAX_REQUESTS') == 5
def test_object_from_loads_settings_from_a_module(): module = 'frontera.tests.scrapy_spider.frontera.settings' settings = BaseSettings.object_from(module) assert settings.get('MAX_REQUESTS') == 5