def test_tables_to_keep_wildcard(self):
     """Test tables using wildcards."""
     job = base_job.Job(os.path.join(os.getcwd(), "my_sql_include_exclude.json"))
     job.connect_to_database()
     self.assertEqual(["cities", "states"], mysql_worker.get_tables(job))
 def test_one_table(self):
     """Test one table is returned for indexing."""
     job = base_job.Job(os.path.join(os.getcwd(), "my_sql_one.json"))
     job.connect_to_database()
     self.assertEqual(["states"], mysql_worker.get_tables(job))
 def test_all_tables(self):
     """Test all tables are returned for indexing."""
     job = base_job.Job(os.path.join(os.getcwd(), "my_sql_all.json"))
     job.connect_to_database()
     base_tables_to_keep = ["books", "cities", "states"]
     self.assertEqual(base_tables_to_keep, mysql_worker.get_tables(job))
Пример #4
0
 def test_tables_to_keep_wildcard(self):
     """Test tables using wildcards."""
     job = base_job.Job(os.path.join(os.getcwd(), 'my_sql_include_exclude.json'))
     job.connect_to_database()
     self.assertEqual(['cities', 'states'], mysql_worker.get_tables(job))
Пример #5
0
 def test_one_table(self):
     """Test one table is returned for indexing."""
     job = base_job.Job(os.path.join(os.getcwd(), 'my_sql_one.json'))
     job.connect_to_database()
     self.assertEqual(['states'], mysql_worker.get_tables(job))
Пример #6
0
 def test_all_tables(self):
     """Test all tables are returned for indexing."""
     job = base_job.Job(os.path.join(os.getcwd(), 'my_sql_all.json'))
     job.connect_to_database()
     base_tables_to_keep = ['books', 'cities', 'states']
     self.assertEqual(base_tables_to_keep, mysql_worker.get_tables(job))