Exemplo n.º 1
0
def test_connexion2():
    DB_CONF["user"] = "******"
    DB_CONF["db"] = "foobar"

    with pytest.raises(AssertionError):
        assert (Db.__init__(Db) == "1044 (42000): Access denied for user \
        'off_user'@'localhost' to database 'foobar'")
Exemplo n.º 2
0
def test_connexion1():
    DB_CONF["user"] = "******"

    with pytest.raises(AssertionError):
        assert (Db.__init__(Db) == "Something is wrong with your user name\
         or password")