Example #1
0
 def test_emp_with_divergente(self):
     query = 'EMPRESTA DIVERGENTE pokemon_nombre'
     cols, col_func = consult.emp(query)
     expected_cols = ['pokemon_nombre']
     expected_func = {'DIVERGENTE': True}
     self.assertEqual(expected_cols, cols)
     self.assertEqual(expected_func, col_func)
Example #2
0
 def test_emp_without_col_funcs(self):
     query = 'EMPRESTA Persona, AnoNac, Sexo'
     cols, col_func = consult.emp(query)
     expected_cols = ['Persona', 'AnoNac', 'Sexo']
     expected_func = {'DIVERGENTE': False}
     self.assertEqual(expected_cols, cols)
     self.assertEqual(expected_func, col_func)
Example #3
0
 def test_emp_with_col_func(self):
     query = 'EMPRESTA MIN(pokemon_experiencia_base), CONTEA(nombre)'
     cols, col_func = consult.emp(query)
     expected_cols = ['pokemon_experiencia_base', 'nombre']
     expected_func = {'DIVERGENTE': False,
                      'pokemon_experiencia_base': 'MIN',
                      'nombre': 'CONTEA'}
     self.assertEqual(expected_cols, cols)
     self.assertEqual(expected_func, col_func)