def test_pre_delete_project_when_no_aq_project(self):

        project = ProjectFactory.create(status='active')

        pre_delete_project(Project, instance=project)

        self.assertEquals(len(mail.outbox), 0)
Esempio n. 2
0
    def test_pre_delete_project_when_no_aq_project(self):

        project = ProjectFactory.create(status='active')

        pre_delete_project(Project, instance=project)

        self.assertEquals(len(mail.outbox), 0)
    def test_pre_delete_project(self):

        project = ProjectFactory.create(status='active')
        aq_project = AirQualityProjectFactory.create(project=project)

        pre_delete_project(Project, instance=project)

        self.assertEqual(
            AirQualityProject.objects.filter(pk=aq_project.id).exists(), False)
        self.assertEquals(len(mail.outbox), 1)
Esempio n. 4
0
    def test_pre_delete_project(self):

        project = ProjectFactory.create(status='active')
        aq_project = AirQualityProjectFactory.create(project=project)

        pre_delete_project(Project, instance=project)

        self.assertEqual(
            AirQualityProject.objects.filter(pk=aq_project.id).exists(),
            False
        )
        self.assertEquals(len(mail.outbox), 1)