Coverage for website/payments/tests/test_tasks.py: 100.00%

8 statements  

« prev     ^ index     » next       coverage.py v7.6.7, created at 2025-08-14 10:31 +0000

1from unittest.mock import patch 

2 

3from django.test import TestCase 

4 

5from payments.tasks import revoke_mandates 

6 

7 

8class CeleryTest(TestCase): 

9 @patch("payments.services.revoke_old_mandates") 

10 def test_minimise_registrations(self, mock_revoke_mandates): 

11 revoke_mandates() 

12 mock_revoke_mandates.assert_called_once()