Ejemplo n.º 1
0
 def test_lock_and_handle_message_unmodified_case(self):
     success = ia_uploader.lock_and_handle_message(self.upload_message)
     self.assertEquals(0, ia_uploader._unlock.call_args[1]['modified'])
Ejemplo n.º 2
0
 def test_lock_and_handle_message_success_case(self):
     success = ia_uploader.lock_and_handle_message(self.upload_message)
     self.assertTrue(success)
     self.assertEquals(1, ia_uploader._lock.call_count)
     self.assertEquals(1, ia_uploader._unlock.call_count)
     self.assertEquals(1, ia_uploader._cleanup_successful_message.call_count)