def test_db_illegal_catalog():
 db = vos_catalog.VOSDatabase.create_empty()
 db._catalogs[u'foo'] = {u'foo': u'bar'}
 with pytest.raises(VOSError):
  db = vos_catalog.VOSDatabase(db._tree)

def test_db_illegal_catalog ( ) : db = vos_catalog . VOSDatabase . create_empty ( ) db . _catalogs [ u'foo' ] = { u'foo' : u'bar' } with pytest . raises ( VOSError ) : db = vos_catalog . VOSDatabase ( db . _tree )
database must have legal catalog .