def test_is_not_unique_for_date(self):
        data = {'slug': 'existing', 'published': '2000-01-01'}
        serializer = UniqueForDateSerializer(data=data)
        assert not serializer.is_valid()
        assert serializer.errors == {
            'slug': ['This field must be unique for the "published" date.']
        }
Failing unique for date validation should result in field error.
dataset/ETHPy150Open tomchristie/django-rest-framework/tests/test_validators.py/TestUniquenessForDateValidation.test_is_not_unique_for_date