Exemple #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}
 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}
 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}
Exemple #5
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values('text','obj__text')
     self.func = self.manager.filter
     self.append_cache = True
Exemple #6
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values().cache()
     self.func = self.manager.filter
Exemple #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
Exemple #8
0
 def setUp(self):
     RelatedCacheTests.setUp(self)
     self.manager = ThirdModel.objects.values().cache()
     self.func = self.manager.filter
Exemple #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}