@@ -245,6 +245,12 @@ def test_post(self, m_call):
245245 self .assertEqual (m_call .return_value , api .post (FAKE_URL , ** PAYLOAD ))
246246 m_call .assert_called_once_with ('POST' , FAKE_URL , PAYLOAD , True )
247247
248+ @mock .patch .object (Client , 'call' )
249+ def test_post_no_body (self , m_call ):
250+ api = Client (ENDPOINT , APPLICATION_KEY , APPLICATION_SECRET , CONSUMER_KEY )
251+ self .assertEqual (m_call .return_value , api .post (FAKE_URL ))
252+ m_call .assert_called_once_with ('POST' , FAKE_URL , None , True )
253+
248254 @mock .patch .object (Client , 'call' )
249255 def test_put (self , m_call ):
250256 PAYLOAD = {
@@ -258,6 +264,12 @@ def test_put(self, m_call):
258264 self .assertEqual (m_call .return_value , api .put (FAKE_URL , ** PAYLOAD ))
259265 m_call .assert_called_once_with ('PUT' , FAKE_URL , PAYLOAD , True )
260266
267+ @mock .patch .object (Client , 'call' )
268+ def test_put_no_body (self , m_call ):
269+ api = Client (ENDPOINT , APPLICATION_KEY , APPLICATION_SECRET , CONSUMER_KEY )
270+ self .assertEqual (m_call .return_value , api .put (FAKE_URL ))
271+ m_call .assert_called_once_with ('PUT' , FAKE_URL , None , True )
272+
261273 ## test core function
262274
263275 @mock .patch ('ovh.client.Session.request' )
0 commit comments