Example #1
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.manager = FirstModel.objects
     self.func = self.manager.cache().exclude(
         secondmodel__thirdmodel__id=500).filter
     self.obj = self.thirdmodel
     self.kwargs = {'secondmodel__thirdmodel': self.obj}
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.manager = FirstModel.objects
     self.func = self.manager.cache().values().filter
     self.obj = self.thirdmodel
     self.kwargs = {'secondmodel__thirdmodel':self.obj}
Example #3
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.kwargs = {'obj__obj':self.obj.obj.obj.id+1}
     self.func = self.manager.cache().exclude
Example #4
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.func = self.manager.select_related().cache().filter
     self.obj = self.thirdmodel
     self.kwargs = {'id':self.obj.id}
Example #5
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.func = self.manager.get
Example #6
0
 def setUp(self):
     settings.DEBUG = True
     ExtraRelatedCacheTests.setUp(self)
     # call count to create any CacheBotSignals first
     self.func(**self.kwargs).count()
Example #7
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     queryset = FirstModel.objects.all()
     self.kwargs = {'obj__obj__in':queryset}
Example #8
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.kwargs = {'obj__obj__in':[self.firstmodel]}
Example #9
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values().cache()
     self.func = self.manager.filter
Example #10
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values('text','obj__text','obj__obj__text')
     self.func = self.manager.filter
     self.append_cache = True
Example #11
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values('obj__text',
                                              'obj__obj__text').cache()
     self.func = self.manager.filter