'Test to the fix issues of comparaison made via type()
in the decorator. In the case of a `Model` implementing
a custom metaclass, the decorator fail because type
doesn\'t return `ModelBase`'

def test_user_has_access_on_model_with_metaclass(self):

    perm = get_user_permission_full_codename(u'change')
    class TestMeta(ModelBase, ):
        pass
    class ProxyUser(User, ):
        class Meta:
            proxy = True
            app_label = User._meta.app_label
        __metaclass__ = TestMeta
    (joe, created) = ProxyUser.objects.get_or_create(username=u'joe')
    assign_perm(perm, self.user, obj=joe)
    request = self._get_request(self.user)
    @permission_required_or_403(perm, (ProxyUser, u'username', u'username'))
    def dummy_view(request, username):
        return HttpResponse(u'dummy_view')
    response = dummy_view(request, username=u'joe')
    self.assertEqual(response.status_code, 200)
    self.assertEqual(response.content, 'dummy_view')
