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

        with self.assertRaises(self.model.ProtectedError):
            el.category.delete()
Parallel version of pandas GroupBy.apply
dataset/ETHPy150Open mozilla/moztrap/tests/model/environments/models/test_category.py/CategoryTest.test_delete_prevention--crossover with--dataset/ETHPy150Open dask/dask/dask/dataframe/groupby.py/_GroupBy.apply