def test_unique_for_date_with_nullable_date(self):
        FlexibleDatePost.objects.create(
            title="Django 1.0 is released", slug="Django 1.0",
            subtitle="Finally", posted=datetime.date(2008, 9, 3),
        )
        p = FlexibleDatePost(title="Django 1.0 is released")
        try:
            p.full_clean()
        except ValidationError:
            self.fail("unique_for_date checks shouldn't trigger when the associated DateField is None.")

        p = FlexibleDatePost(slug="Django 1.0")
        try:
            p.full_clean()
        except __HOLE__:
            self.fail("unique_for_year checks shouldn't trigger when the associated DateField is None.")

        p = FlexibleDatePost(subtitle="Finally")
        try:
            p.full_clean()
        except ValidationError:
            self.fail("unique_for_month checks shouldn't trigger when the associated DateField is None.")
dataset/ETHPy150Open django/django/tests/validation/test_unique.py/PerformUniqueChecksTest.test_unique_for_date_with_nullable_date