Beispiel #1
0
    def test_change(self):
        conn = Database.conn
        Database.change(mysql_db)
        assert Database.conn is conn

        Database.config(db=mysql_db)
        Database.execute('insert into user set user.name="test"')
        assert Database.conn_is_up()
        assert Database.conn is not conn
Beispiel #2
0
 def test_connect(self):
     Database.connect()
     assert Database.conn_is_up()