MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / test_simple_expected_body

Method test_simple_expected_body

tests/test_mocks.py:108–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 pass
107
108 def test_simple_expected_body(self):
109 requestBuilder = RequestMockBuilder(
110 {"zoo.animals.insert": (None, '{"data": {"foo": "bar"}}', "{}")}
111 )
112 zoo = build(
113 "zoo",
114 "v1",
115 http=self.zoo_http,
116 requestBuilder=requestBuilder,
117 static_discovery=False,
118 )
119
120 try:
121 zoo.animals().insert(body="").execute()
122 self.fail("UnexpectedBodyError should have been raised")
123 except UnexpectedBodyError:
124 pass
125
126 def test_simple_wrong_body(self):
127 requestBuilder = RequestMockBuilder(

Callers

nothing calls this directly

Calls 3

RequestMockBuilderClass · 0.90
buildFunction · 0.90
executeMethod · 0.45

Tested by

no test coverage detected