def test_no_processed_payment_is_available(self): payments = [ make_payment({'transaction_id': '1'}), make_payment({'transaction_id': '2'}), ] self.assertEqual(list(utils._get_not_processed_payments(payments)), payments)
def test_processed_payments_filtered(self): payments = [ make_payment({'transaction_id': '1'}), make_payment({'transaction_id': '2'}), make_payment({'transaction_id': '3'}), ] ProcessedTransaction.objects.create(transaction_id='2', amount=0) self.assertEqual(list(utils._get_not_processed_payments(payments)), [ make_payment({'transaction_id': '1'}), make_payment({'transaction_id': '3'}), ])