本文整理汇总了Python中coupon.factories.slot_factory.SLOT_FACTORY.get_active_coupons方法的典型用法代码示例。如果您正苦于以下问题:Python SLOT_FACTORY.get_active_coupons方法的具体用法?Python SLOT_FACTORY.get_active_coupons怎么用?Python SLOT_FACTORY.get_active_coupons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coupon.factories.slot_factory.SLOT_FACTORY
的用法示例。
在下文中一共展示了SLOT_FACTORY.get_active_coupons方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from coupon.factories.slot_factory import SLOT_FACTORY [as 别名]
# 或者: from coupon.factories.slot_factory.SLOT_FACTORY import get_active_coupons [as 别名]
def setUp(self):
super(TestShowAllCouponsThisBiz, self).setUp()
self.slot_list = SLOT_FACTORY.create_slot_family(create_count=3)[1]
self.coupon_list = SLOT_FACTORY.get_active_coupons(
slot_list=self.slot_list)
self.coupon0 = self.coupon_list[0]
self.business = self.coupon0.offer.business
self.consumer = self.business.advertiser.consumer
self.request_data = None
self.response = None
示例2: setUp
# 需要导入模块: from coupon.factories.slot_factory import SLOT_FACTORY [as 别名]
# 或者: from coupon.factories.slot_factory.SLOT_FACTORY import get_active_coupons [as 别名]
def setUp(self):
super(SearchCouponsTestCase, self).setUp()
self.slot_list = SLOT_FACTORY.create_slots(create_count=5)
haystack_site.get_index(Coupon).reindex()
self.coupon_list = SLOT_FACTORY.get_active_coupons(
slot_list=self.slot_list)
self.coupon0 = self.coupon_list[0]
self.all_coupons = ALL_COUPONS.get_all_coupons(
Site.objects.get(id=2))[0]
self.request_data = None
self.response = None