def test_can_add_an_index_after_closure(self): g = Gremlin() g.condition('x').close('body')[12:44] s = str(g) params = g.bound_params x = get_dict_key(params, 'x') expected = 'g.condition(%s){body}[12..44]' % x self.assertTrue(s == expected) self.assertTrue(len(params) == 1)
def test_can_add_function_with_closure(self): g = Gremlin() g.condition('x').close('body') s = str(g) params = g.bound_params x = get_dict_key(params, 'x') expected = 'g.condition(%s){body}' % x self.assertTrue(s == expected) self.assertTrue(len(params) == 1)