def test_file_field(self):
        class SomeModel2(models.Model):
            file = models.FileField(upload_to='images/')

        obj = SomeModel2()
        perm_model = get_obj_perms_model(obj, UserObjectPermissionBase,
                                         UserObjectPermission)
        self.assertEqual(perm_model, UserObjectPermission)
    def test_image_field(self):

        class SomeModel(models.Model):
            image = models.ImageField(upload_to='images/')

        obj = SomeModel()
        perm_model = get_obj_perms_model(obj, UserObjectPermissionBase,
            UserObjectPermission)
        self.assertEqual(perm_model, UserObjectPermission)