def test_get_drop_database():
    assert query_factory.get_drop_database("test_database") == [
        "SELECT pid, pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'test_database' AND pid != pg_backend_pid();",
        "DROP DATABASE IF EXISTS test_database;"
    ]
Example #2
0
 def drop_database(self):
     """Drop the working database"""
     self.__runner.execute(query_factory.get_drop_database(self.db_name))