def test_generate_query_columns(self): cols = ['name', 'romanname', 'power', 'symbol', 'father', 'mother'] result = generateQuery("hera zeus", 'gods', cols) for col in cols: with self.subTest(col=col): self.assertTrue(col in result[0]) self.assertTrue(col in result[1])
def test_generate_query_correct_join(self): result = generateQuery("hera zeus", 'gods', []) self.assertTrue('intersect' in result[0].lower()) self.assertTrue('union' in result[1].lower())
def test_generate_query_table(self): result = generateQuery("hera zeus", 'gods', []) self.assertTrue('god' in result[0]) self.assertTrue('god' in result[1])
def test_generate_query_terms(self): result = generateQuery("hera zeus", 'gods', []) self.assertTrue('hera' in result[0]) self.assertTrue('hera' in result[1]) self.assertTrue('zeus' in result[0]) self.assertTrue('zeus' in result[1])