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

Method test_simple_wrong_body

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

Source from the content-addressed store, hash-verified

124 pass
125
126 def test_simple_wrong_body(self):
127 requestBuilder = RequestMockBuilder(
128 {
129 "zoo.animals.insert": (
130 None,
131 '{"data": {"foo": "bar"}}',
132 '{"data": {"foo": "bar"}}',
133 )
134 }
135 )
136 zoo = build(
137 "zoo",
138 "v1",
139 http=self.zoo_http,
140 requestBuilder=requestBuilder,
141 static_discovery=False,
142 )
143
144 try:
145 zoo.animals().insert(body='{"data": {"foo": "blah"}}').execute()
146 self.fail("UnexpectedBodyError should have been raised")
147 except UnexpectedBodyError:
148 pass
149
150 def test_simple_matching_str_body(self):
151 requestBuilder = RequestMockBuilder(

Callers

nothing calls this directly

Calls 3

RequestMockBuilderClass · 0.90
buildFunction · 0.90
executeMethod · 0.45

Tested by

no test coverage detected