Exemplo n.º 1
0
 def test_create_database(self):
     dropdb()
     create_database()
     self.assertTrue(database_connectivity())
     self.assertTrue(database_exists())
     self.assertTrue(schema_is_sane())
     self.assertFalse(schema_has_data())
Exemplo n.º 2
0
    def test_schema_has_data(self):
        dropdb()
        createdb()
        self.assertFalse(schema_has_data())

        for tablename, _ in tables:
            createtable(tablename)

        self.assertFalse(schema_has_data())
        insertfoo(tables[0][0])
        self.assertFalse(schema_has_data())

        for tablename, _ in tables[1:]:
            insertfoo(tablename)

        self.assertTrue(schema_has_data())