def test_get_parent_category(self):
        result = self.event.get_parent_category()
        self.assertEqual(result, self.event.category, msg=(
            "If the event's category has no parent, it should return the"
            " category"))

        cat2 = mixer.blend('calendarium.EventCategory')
        self.event.category.parent = cat2
        self.event.save()
        result = self.event.get_parent_category()
        self.assertEqual(result, self.event.category.parent, msg=(
            "If the event's category has a parent, it should return that"
            " parent"))
Tests for the ``get_parent_category`` method.
dataset/ETHPy150Open bitmazk/django-calendarium/calendarium/tests/models_tests.py/EventTestCase.test_get_parent_category