Exemple #1
0
    def test_deletes(self):
        project = self.create_project(status=ObjectStatus.PENDING_DELETION)

        with self.tasks():
            generic_delete("sentry", "project", object_id=project.id)

        assert not Project.objects.filter(id=project.id).exists()
Exemple #2
0
    def test_deletes(self):
        project = self.create_project(
            status=ObjectStatus.PENDING_DELETION,
        )

        with self.tasks():
            generic_delete('sentry', 'project', object_id=project.id)

        assert not Project.objects.filter(id=project.id).exists()
Exemple #3
0
    def test_does_not_delete_visible(self):
        project = self.create_project(status=ObjectStatus.VISIBLE)

        with self.tasks():
            with pytest.raises(DeleteAborted):
                generic_delete("sentry", "project", object_id=project.id)

        project = Project.objects.get(id=project.id)
        assert project.status == ObjectStatus.VISIBLE
Exemple #4
0
    def test_does_not_delete_visible(self):
        project = self.create_project(
            status=ObjectStatus.VISIBLE,
        )

        with self.tasks():
            with pytest.raises(DeleteAborted):
                generic_delete('sentry', 'project', object_id=project.id)

        project = Project.objects.get(id=project.id)
        assert project.status == ObjectStatus.VISIBLE