예제 #1
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ManyModel.objects
     self.func = self.manager.cache().filter
     self.obj = self.manymodel
     self.related_obj = self.firstmodel
     self.kwargs = {'firstmodel': self.related_obj}
예제 #2
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ManyModel.objects
     self.func = self.manager.cache().filter
     self.obj = self.manymodel
     self.related_obj = self.firstmodel
     self.kwargs = {'firstmodel':self.related_obj}
예제 #3
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.func = self.manager.get
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = FirstModel.objects
     self.func = self.manager.cache().filter
     self.obj = self.secondmodel
     self.kwargs = {'secondmodel':self.obj}
예제 #5
0
파일: values_tests.py 프로젝트: braskin/pd
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values('text','obj__text')
     self.func = self.manager.filter
     self.append_cache = True
예제 #6
0
파일: values_tests.py 프로젝트: braskin/pd
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values().cache()
     self.func = self.manager.filter
예제 #7
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values('text', 'obj__text')
     self.func = self.manager.filter
     self.append_cache = True
예제 #8
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values().cache()
     self.func = self.manager.filter
예제 #9
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = FirstModel.objects
     self.func = self.manager.cache().filter
     self.obj = self.secondmodel
     self.kwargs = {'secondmodel': self.obj}