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'")
def test_connexion1(): DB_CONF["user"] = "******" with pytest.raises(AssertionError): assert (Db.__init__(Db) == "Something is wrong with your user name\ or password")