Exemplo n.º 1
0
def test_Schema_create_dictionary_init(dictionary, simple_schema_content, string_io):
    schema = Schema(dictionary=dictionary, init=simple_schema_content)
    schema.dump(stream=string_io)
    assert string_io.getvalue() == SIMPLE_SCHEMA_DUMP
    assert len(dictionary) > 0
Exemplo n.º 2
0
def test_Schema_create_dictionary(dictionary, string_io):
    schema = Schema(dictionary=dictionary)
    schema.dump(stream=string_io)
    assert string_io.getvalue() == ""
Exemplo n.º 3
0
def test_Schema_create_empty(string_io):
    schema = Schema()
    schema.dump(stream=string_io)
    assert string_io.getvalue() == ""
Exemplo n.º 4
0
def test_Schema_create_init(dictionary, simple_schema_content, string_io):
    schema = Schema(init=simple_schema_content)
    schema.dump(stream=string_io)
    assert string_io.getvalue() == SIMPLE_SCHEMA_DUMP
    assert len(dictionary) == 0
Exemplo n.º 5
0
def test_Schema_create_dictionary(dictionary, string_io):
    schema = Schema(dictionary=dictionary)
    schema.dump(stream=string_io)
    assert string_io.getvalue() == ""
Exemplo n.º 6
0
def test_Schema_create_empty(string_io):
    schema = Schema()
    schema.dump(stream=string_io)
    assert string_io.getvalue() == ""