Commits

Luciano Pacheco committed d671b2d

fixing the tests; the old problem of piston guessing the fields for a model

Comments (0)

Files changed (1)

tests/test_project/apps/testapp/handlers.py

             super(Issue58Model, self).create(request)
 
 class FieldBlankHandler(BaseHandler):
-    model = TestModel
+    class BlankTestModel(TestModel):
+        class Meta:
+            proxy = True
+    model = BlankTestModel
     allowed_methods = ['GET',]
     fields = ('id', 'test1', 'blank_field')
 
     def read(self, request, pk=None):
         if pk is not None:
-            ret =  TestModel.objects.get(pk=int(pk))
+            ret = self.model.objects.get(pk=int(pk))
             ret.blank_field = ''
             return ret
         paginator = Paginator(TestModel.objects.all(), 25)