Ejemplo n.º 1
0
def test_unspecified_format_from_file():
    "from_file: Unspecified format for file descriptor raises ValueError."
    Database.from_file(StringIO(ALCRNI_TDB))
Ejemplo n.º 2
0
def test_unspecified_format_from_file():
    "from_file: Unspecified format for file descriptor raises ValueError."
    Database.from_file(StringIO(ALCRNI_TDB))
Ejemplo n.º 3
0
def test_load_from_stringio_from_file():
    "Test database loading from a file-like object with the from_file method."
    test_tdb = Database.from_file(StringIO(ALCRNI_TDB), fmt='tdb')
    assert test_tdb == REFERENCE_DBF
Ejemplo n.º 4
0
def test_load_from_stringio():
    "Test database loading from a file-like object."
    test_tdb = Database.from_file(StringIO(ALCRNI_TDB), fmt='tdb')
    assert test_tdb == REFERENCE_DBF