def test_query_string_must_be_provided(self): task = PostgresExecute( db_name="test", user="******", password="******", host="test" ) with pytest.raises(ValueError) as exc: task.run() assert "A query string must be provided" == str(exc.value)
def test_query_string_must_be_provided(self): task = PostgresExecute(db_name="test", user="******", password="******", host="test") with pytest.raises(ValueError, match="A query string must be provided"): task.run()