Beispiel #1
0
 def test_combination(self):
     assert _.foo.bar[_.bing(param1=4.1).baz.foo_bar_bla(
         p2=None, r='')[_.height(unit='cm')].oof.qux()] == SelectionSet(
             Field('foo'),
             Field('bar',
                   selection_set=SelectionSet(
                       Field('bing', fdict({'param1': 4.1})),
                       Field('baz'),
                       Field(
                           'foo_bar_bla', fdict({
                               'p2': None,
                               'r': ''
                           }),
                           SelectionSet(
                               Field('height', fdict({'unit': 'cm'})), )),
                       Field('oof'),
                       Field('qux'),
                   )))
Beispiel #2
0
 def test_combination(self):
     assert _.foo.bar[_.bing(param1=4.1).baz.foo_bar_bla(
         p2=None, r="")[_.height(unit="cm")].oof.qux()] == SelectionSet(
             Field("foo"),
             Field(
                 "bar",
                 selection_set=SelectionSet(
                     Field("bing", fdict({"param1": 4.1})),
                     Field("baz"),
                     Field(
                         "foo_bar_bla",
                         fdict({
                             "p2": None,
                             "r": ""
                         }),
                         SelectionSet(Field("height", fdict({"unit":
                                                             "cm"}))),
                     ),
                     Field("oof"),
                     Field("qux"),
                 ),
             ),
         )