Ejemplo n.º 1
0
    def test_can_nest_dynamically_created_predicates(self):
        ran = 'someFunc' + str(random())
        ran2 = 'outer' + str(random())
        pred = _(ran)
        pred2 = _(ran2, pred)
        g = Gremlin()
        g.function(pred2)

        expected = 'g.function({}({}()))'.format(ran2, ran)
        s = str(g)

        self.assertEqual(s, expected)
Ejemplo n.º 2
0
    def test_can_nest_dynamically_created_predicates(self):
        ran = 'someFunc'+ str(random())
        ran2 = 'outer'+ str(random())
        pred = _(ran)
        pred2 = _(ran2, pred)
        g = Gremlin()
        g.function(pred2)

        expected = 'g.function({}({}()))'.format(ran2, ran)
        s = str(g)

        self.assertEqual(s, expected)
Ejemplo n.º 3
0
    def test_can_create_dynamic_predicate(self):
        ran = 'someFunc' + str(random())
        pred = _(ran)
        g = Gremlin()
        g.function(pred)

        expected = 'g.function({}())'.format(ran)
        s = str(g)

        self.assertEqual(s, expected)
Ejemplo n.º 4
0
    def test_can_create_dynamic_predicate(self):
        ran = 'someFunc'+ str(random())
        pred = _(ran)
        g = Gremlin()
        g.function(pred)

        expected = 'g.function({}())'.format(ran)
        s = str(g)

        self.assertEqual(s, expected)