本文整理汇总了Python中cachebot.tests.base_tests.ExtraRelatedCacheTests.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python ExtraRelatedCacheTests.setUp方法的具体用法?Python ExtraRelatedCacheTests.setUp怎么用?Python ExtraRelatedCacheTests.setUp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cachebot.tests.base_tests.ExtraRelatedCacheTests
的用法示例。
在下文中一共展示了ExtraRelatedCacheTests.setUp方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from cachebot.tests.base_tests import ExtraRelatedCacheTests [as 别名]
# 或者: from cachebot.tests.base_tests.ExtraRelatedCacheTests import setUp [as 别名]
def setUp(self):
ExtraRelatedCacheTests.setUp(self)
self.kwargs = {'obj__obj':self.obj.obj.obj.id+1}
self.func = self.manager.cache().exclude
示例2: setUp
# 需要导入模块: from cachebot.tests.base_tests import ExtraRelatedCacheTests [as 别名]
# 或者: from cachebot.tests.base_tests.ExtraRelatedCacheTests import setUp [as 别名]
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}
示例3: setUp
# 需要导入模块: from cachebot.tests.base_tests import ExtraRelatedCacheTests [as 别名]
# 或者: from cachebot.tests.base_tests.ExtraRelatedCacheTests import setUp [as 别名]
def setUp(self):
ExtraRelatedCacheTests.setUp(self)
self.manager = ThirdModel.objects.values().cache()
self.func = self.manager.filter