print("Test datasource exists")
test_tables = fetch("show tables from test_data", as_dict=False)
test_tables = [x[0] for x in test_tables]
self.assertTrue(TEST_DATA_TABLE in test_tables)
print("Test predictor table not exists")
mindsdb_tables = fetch(f"show tables from {MINDSDB_DATABASE}", as_dict=False)
mindsdb_tables = [x[0] for x in mindsdb_tables]
self.assertTrue(TEST_PREDICTOR_NAME not in mindsdb_tables)
print("mindsdb.predictors table exists")
After Change
print("Test mindsdb tables exists")
self.assertTrue(TEST_DATA_TABLE in self.get_tables_in("test_data"))
mindsdb_tables = self.get_tables_in(MINDSDB_DATABASE)
self.assertTrue(TEST_PREDICTOR_NAME not in mindsdb_tables)
self.assertTrue("predictors" in mindsdb_tables)
self.assertTrue("commands" in mindsdb_tables)