示例#1
0
def test_create_home():
    assert not target.exists()
    create_home(target)
    assert target.exists()
    assert config.exists()
    with config.open() as inf:
        assert load_settings(inf) == DEFAULT
示例#2
0
def test_dumping_settings_should_result_in_json_parsable_file():
    file_ = StringIO()
    dump_settings(DEFAULT, file_)
    settings = load_settings(StringIO(file_.getvalue()))
    assert settings == DEFAULT