Пример #1
0
def test_ConfigObjSerializer_from_stream(simple_config_content, serializer, string_io):
    string_io.write(SIMPLE_CONFIG_CONFIGOBJ_SERIALIZATION)
    string_io.seek(0)
    obj = serializer.from_stream(stream=string_io)
    # configobj does not preserve ordering
    assert compare_dicts(obj, simple_config_content)
def test_ZirkonSerializer_to_from_stream(simple_config_content, serializer, string_io):
    serializer.to_stream(obj=simple_config_content, stream=string_io)
    string_io.seek(0)
    obj = serializer.from_stream(stream=string_io)
    assert compare_dicts(obj, simple_config_content)
def test_ZirkonSerializer_from_stream(simple_config_content, serializer, string_io):
    string_io.write(SIMPLE_CONFIG_ZIRKON_SERIALIZATION)
    string_io.seek(0)
    obj = serializer.from_stream(stream=string_io)
    assert obj == simple_config_content
Пример #4
0
def test_ZirkonSerializer_from_stream(simple_config_content, serializer,
                                      string_io):
    string_io.write(SIMPLE_CONFIG_ZIRKON_SERIALIZATION)
    string_io.seek(0)
    obj = serializer.from_stream(stream=string_io)
    assert obj == simple_config_content