Beispiel #1
0
 def test_transfer_delivery_no_recipient(self, mock_azure_transfer):
     mock_azure_transfer.return_value.email_sender.return_value.email_text = "emailtext1"
     mock_azure_transfer.return_value.email_recipient.return_value.email_text = "emailtext2"
     TransferFunctions.transfer_delivery(delivery_id='123', transfer_project=False, add_download_users=False,
                                         change_owner=False, email_sender=False, email_recipient=False)
     tasks.run_next_task()
     expected_calls = [
         call.ensure_transferring_state(),
         call.mark_complete()
     ]
     mock_azure_transfer.return_value.assert_has_calls(expected_calls)
Beispiel #2
0
 def test_transfer_delivery(self, mock_azure_transfer):
     mock_azure_transfer.return_value.email_sender.return_value.email_text = "emailtext1"
     mock_azure_transfer.return_value.email_recipient.return_value.email_text = "emailtext2"
     TransferFunctions.transfer_delivery(delivery_id='123')
     tasks.run_next_task()
     expected_calls = [
         call.ensure_transferring_state(),
         call.record_object_manifest(),
         call.transfer_project(),
         call.give_download_users_permissions(),
         call.update_owner_permissions(),
         call.email_sender(),
         call.email_recipient(),
         call.mark_complete()
     ]
     mock_azure_transfer.return_value.assert_has_calls(expected_calls)