Exemplo n.º 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}
Exemplo n.º 3
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.kwargs = {'obj__obj':self.obj.obj.obj.id+1}
     self.func = self.manager.cache().exclude
Exemplo n.º 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}
Exemplo n.º 5
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.func = self.manager.get
Exemplo n.º 6
0
 def setUp(self):
     settings.DEBUG = True
     ExtraRelatedCacheTests.setUp(self)
     # call count to create any CacheBotSignals first
     self.func(**self.kwargs).count()
Exemplo n.º 7
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     queryset = FirstModel.objects.all()
     self.kwargs = {'obj__obj__in':queryset}
Exemplo n.º 8
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.kwargs = {'obj__obj__in':[self.firstmodel]}
Exemplo n.º 9
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values().cache()
     self.func = self.manager.filter
Exemplo n.º 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
Exemplo n.º 11
0
 def setUp(self):
     ExtraRelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values('obj__text',
                                              'obj__obj__text').cache()
     self.func = self.manager.filter