def test_collect_static_uses_configuration_value():
    core.register_filehandler(TestHandler)
    core.config['STATIC_FOLDER'] = os.path.join(HERE, 'static')
    core.collect_static()
    expected1 = os.path.join(HERE, 'static', 'fakemodule', 'fakestyle.css')
    assert_file_exists(expected1)
    shutil.rmtree(core.config['STATIC_FOLDER'])
def test_collect_static():
    core.register_filehandler(TestHandler)
    dest = os.path.join(HERE, 'static')
    core.collect_static(dest=dest)
    expected1 = os.path.join(HERE, 'static', 'fakemodule', 'fakestyle.css')
    assert_file_exists(expected1)
    # clean up
    shutil.rmtree(dest)
def test_collect_static_raises_error_if_no_destination():
    with pytest.raises(ConfigurationError):
        core.collect_static()