def METHOD_NAME(self):
    def filter_func(*args, **kwargs):
        uniq_field = kwargs.get('uniq_field')
        if uniq_field == 'a':
            return mocked_qs
        return None
    mocked_qs = mock.Mock(spec=PostWithUniqFieldCompat.objects)
    mocked_qs.filter.side_effect = filter_func
    mocked_qs.exclude.return_value = mocked_qs
    field = models.CharField
    with mock.patch(
            'django_extensions.db.fields.UniqueFieldMixin.get_queryset',
            return_value=mocked_qs
    ) as get_qs:
        res = self.uniq_field.find_unique(self.post, field, iter('abcde'))
    get_qs.assert_called_with(PostWithUniqFieldCompat, field)
    mocked_qs.exclude.assert_called_with(pk=self.post.pk)
    self.assertEqual(res, 'b')
    self.assertTrue(hasattr(self.post, 'uniq_field'))
    self.assertEqual(self.post.uniq_field, 'b')