def test_delete_prevention_ignores_deleted_envs(self):
        el = self.F.ElementFactory.create(name="Debian")
        env = self.F.EnvironmentFactory.create()
        env.elements.add(el)

        env.delete()

        el.category.delete()

        self.assertFalse(self.refresh(el.category).deleted_on is None)
Can delete category included only in a deleted environment.
dataset/ETHPy150Open mozilla/moztrap/tests/model/environments/models/test_category.py/CategoryTest.test_delete_prevention_ignores_deleted_envs