Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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