def test_constructor(self): """Test Executer constructor""" ex = _Executer(self.curs) self.assertTrue( hasattr( ex, '__init__') ) self.assertTrue( hasattr( ex, '__call__') ) self.assertTrue( hasattr( ex, '__getattr__') ) self.assertTrue( hasattr( ex, '__execute') ) self.assertTrue( hasattr( ex, '__cursor') )
def test_execute(self): """Test internal execute function""" nrecs0 = _Executer(self.curs).execute('lookup', table='origin') self.assertEqual(nrecs0, self.NRECS_ORIGIN)