Esempio n. 1
0
 def _clearTestDatabases(self):
     engine = connect("root", "password")
     dbs = engine.execute(text("SHOW databases LIKE :bn"), bn="%s%%" % "wcloud_test")
     dbs = dbs.fetchall()
     dbs = [db[0] for db in dbs]
     for db in dbs:
         engine.execute("DROP DATABASE %s" % db)
    def test_destroy_db(self):
        db = create_db.delay("root", "password", "wcloudtest", "wcloud", "password").get()
        destroy_db.delay("root", "password", db).get()

        engine = connect("root", "password")
        dbs = engine.execute("SHOW databases LIKE '%s'" % db).fetchall()
        assert len(dbs) == 0
Esempio n. 3
0
 def _clearTestDatabases(self):
     engine = connect("root", "password")
     dbs = engine.execute(text("SHOW databases LIKE :bn"),
                          bn="%s%%" % "wcloud_test")
     dbs = dbs.fetchall()
     dbs = [db[0] for db in dbs]
     for db in dbs:
         engine.execute("DROP DATABASE %s" % db)
Esempio n. 4
0
    def test_destroy_db(self):
        db = create_db.delay("root", "password", "wcloudtest", "wcloud",
                             "password").get()
        destroy_db.delay("root", "password", db).get()

        engine = connect("root", "password")
        dbs = engine.execute("SHOW databases LIKE '%s'" % db).fetchall()
        assert len(dbs) == 0
Esempio n. 5
0
 def test_connect(self):
     """
     Test that we can connect to the database.
     """
     engine = connect("root", "password")
     assert_is_not_none(engine, "Engine is None")
Esempio n. 6
0
 def test_connect(self):
     """
     Test that we can connect to the database.
     """
     engine = connect("root", "password")
     assert_is_not_none(engine, "Engine is None")