def test_direct_cp(self): cp = CountryProgrammeFactory(to_date=self.lead_date) InterventionFactory( document_type=Intervention.PD, end=self.lead_date + datetime.timedelta(days=10), country_programme=cp, ) mock_send = Mock() with patch(self.send_path, mock_send): utils.send_pca_required_notifications() self.assertEqual(mock_send.call_count, 1)
def test_direct_cp(self): cp = CountryProgrammeFactory(to_date=self.lead_date) InterventionFactory( document_type=Intervention.PD, end=self.lead_date + datetime.timedelta(days=10), country_programme=cp, ) mock_send = Mock() with patch(self.send_path, mock_send): utils.send_pca_required_notifications() self.assertEqual(mock_send.call_count, 1)
def check_pca_required(): send_pca_required_notifications()
def handle(self, *args, **options): send_pca_required_notifications()