Esempio n. 1
0
 def test_graph_entity_can_build_path_with_args(self):
     # create a graph entity to test
     entity = GraphEntity(service=Mock(), model_type='user', id=1)
     # build a path to test
     assert entity.foo(bar="baz").bar._api_path == [
         {"name": "user", "args": {"id": 1}},
         {"name": "foo", "args": {"bar": "baz"}},
         {"name": "bar", "args": {}}
     ], "Internal api with args path did not match expectation."
Esempio n. 2
0
 def test_graph_entity_can_build_path_with_args(self):
     # create a graph entity to test
     entity = GraphEntity(service=Mock(), model_type='user', id=1)
     # build a path to test
     assert entity.foo(bar="baz").bar._api_path == [{
         "name": "user",
         "args": {
             "id": 1
         }
     }, {
         "name": "foo",
         "args": {
             "bar": "baz"
         }
     }, {
         "name": "bar",
         "args": {}
     }], "Internal api with args path did not match expectation."