Example #1
0
 def test_update(self):
     reimbursement = Mock()
     command = Command()
     command.queue = []
     command.update(reimbursement)
     reimbursement.get_receipt_url.assert_called_once_with(bulk=True)
     self.assertEqual(1, len(command.queue))
 def test_update(self):
     reimbursement = Mock()
     command = Command()
     command.queue = []
     command.update(reimbursement)
     reimbursement.get_receipt_url.assert_called_once_with(bulk=True)
     self.assertEqual(1, len(command.queue))
 def test_update_with_error(self):
     reimbursement = Mock()
     reimbursement.get_receipt_url.side_effect = ConnectionError()
     command = Command()
     command.queue = []
     command.update(reimbursement)
     reimbursement.get_receipt_url.assert_called_once_with(bulk=True)
     self.assertEqual(0, len(command.queue))
Example #4
0
 def test_update_with_error(self):
     reimbursement = Mock()
     reimbursement.get_receipt_url.side_effect = ConnectionError()
     command = Command()
     command.queue = []
     command.update(reimbursement)
     reimbursement.get_receipt_url.assert_called_once_with(bulk=True)
     self.assertEqual(0, len(command.queue))