'Verify that the function works when the objects that should be returned
have non-integer primary keys.'

def test_non_integer_primary_key(self):

    obj_with_char_pk = NonIntPKModel.objects.create(char_pk=u'testprimarykey')
    assign_perm(u'add_nonintpkmodel', self.user, obj_with_char_pk)
    objects = get_objects_for_user(self.user, u'testapp.add_nonintpkmodel')
    self.assertEqual(len(objects), 1)
    self.assertTrue(isinstance(objects, QuerySet))
    self.assertEqual(set(objects.values_list(u'pk', flat=True)), set([obj_with_char_pk.pk]))
