@@ -234,35 +234,45 @@ def test_get(self, MockSession):
234234 url = "https://connect.example.com"
235235 client = Client (api_key = api_key , url = url )
236236 client .get ("/foo" )
237- client .session .get .assert_called_once_with ("https://connect.example.com/__api__/foo" )
237+ MockSession .return_value .get .assert_called_once_with (
238+ "https://connect.example.com/__api__/foo"
239+ )
238240
239241 def test_post (self , MockSession ):
240242 api_key = "12345"
241243 url = "https://connect.example.com"
242244 client = Client (api_key = api_key , url = url )
243245 client .post ("/foo" )
244- client .session .post .assert_called_once_with ("https://connect.example.com/__api__/foo" )
246+ MockSession .return_value .post .assert_called_once_with (
247+ "https://connect.example.com/__api__/foo"
248+ )
245249
246250 def test_put (self , MockSession ):
247251 api_key = "12345"
248252 url = "https://connect.example.com"
249253 client = Client (api_key = api_key , url = url )
250254 client .put ("/foo" )
251- client .session .put .assert_called_once_with ("https://connect.example.com/__api__/foo" )
255+ MockSession .return_value .put .assert_called_once_with (
256+ "https://connect.example.com/__api__/foo"
257+ )
252258
253259 def test_patch (self , MockSession ):
254260 api_key = "12345"
255261 url = "https://connect.example.com"
256262 client = Client (api_key = api_key , url = url )
257263 client .patch ("/foo" )
258- client .session .patch .assert_called_once_with ("https://connect.example.com/__api__/foo" )
264+ MockSession .return_value .patch .assert_called_once_with (
265+ "https://connect.example.com/__api__/foo"
266+ )
259267
260268 def test_delete (self , MockSession ):
261269 api_key = "12345"
262270 url = "https://connect.example.com"
263271 client = Client (api_key = api_key , url = url )
264272 client .delete ("/foo" )
265- client .session .delete .assert_called_once_with ("https://connect.example.com/__api__/foo" )
273+ MockSession .return_value .delete .assert_called_once_with (
274+ "https://connect.example.com/__api__/foo"
275+ )
266276
267277
268278class TestClientOAuth :
0 commit comments