Ejemplo n.º 1
0
 def test_dont_disable_if_wrong_operation(self):
     disable_upload_callbacks(self.request, 'OtherOperation')
     self.assertFalse(self.request.body.disable_callback.called)
Ejemplo n.º 2
0
 def test_disable_request_on_upload_part(self):
     disable_upload_callbacks(self.request, 'UploadPart')
     self.request.body.disable_callback.assert_called_with()
Ejemplo n.º 3
0
 def test_dont_disable_if_missing_interface(self):
     del self.request.body.disable_callback
     disable_upload_callbacks(self.request, 'PutObject')
     self.assertEqual(self.request.body.method_calls, [])
Ejemplo n.º 4
0
 def test_disable_request_on_put_object(self):
     disable_upload_callbacks(self.request, 'PutObject')
     self.request.body.disable_callback.assert_called_with()
Ejemplo n.º 5
0
 def test_dont_disable_if_wrong_operation(self):
     disable_upload_callbacks(self.request,
                              'OtherOperation')
     self.assertFalse(
         self.request.body.disable_callback.called)
Ejemplo n.º 6
0
 def test_dont_disable_if_missing_interface(self):
     del self.request.body.disable_callback
     disable_upload_callbacks(self.request,
                              'PutObject')
     self.assertEqual(self.request.body.method_calls, [])
Ejemplo n.º 7
0
 def test_disable_request_on_upload_part(self):
     disable_upload_callbacks(self.request,
                              'UploadPart')
     self.request.body.disable_callback.assert_called_with()
Ejemplo n.º 8
0
 def test_disable_request_on_put_object(self):
     disable_upload_callbacks(self.request,
                              'PutObject')
     self.request.body.disable_callback.assert_called_with()