'Passing unique for date validation.'

def test_is_unique_for_date(self):

    data = {'slug': 'existing', 'published': '2000-01-02'}
    serializer = UniqueForDateSerializer(data=data)
    assert serializer.is_valid()
    assert (serializer.validated_data == {'slug': 'existing', 'published': datetime.date(2000, 1, 2)})
