本文整理汇总了Python中shop.views.checkout.CheckoutSelectionView.save_addresses_to_order方法的典型用法代码示例。如果您正苦于以下问题:Python CheckoutSelectionView.save_addresses_to_order方法的具体用法?Python CheckoutSelectionView.save_addresses_to_order怎么用?Python CheckoutSelectionView.save_addresses_to_order使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shop.views.checkout.CheckoutSelectionView
的用法示例。
在下文中一共展示了CheckoutSelectionView.save_addresses_to_order方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_assigning_to_order_from_view_works_with_name_and_address
# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import save_addresses_to_order [as 别名]
def test_assigning_to_order_from_view_works_with_name_and_address(self):
self.s_add.name = 'toto'
self.s_add.address2 = 'address2'
self.s_add.save()
self.b_add.name = 'toto'
self.b_add.address2 = 'address2'
self.b_add.save()
view = CheckoutSelectionView(request=self.request)
view.save_addresses_to_order(self.order, self.s_add, self.b_add)
self.check_order_address()
示例2: test_assigning_to_order_from_view_works
# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import save_addresses_to_order [as 别名]
def test_assigning_to_order_from_view_works(self):
view = CheckoutSelectionView(request=self.request)
view.save_addresses_to_order(self.order, self.s_add, self.b_add)
self.check_order_address()