当前位置: 首页>>代码示例>>Python>>正文


Python CheckoutSelectionView.get_billing_address_form方法代码示例

本文整理汇总了Python中shop.views.checkout.CheckoutSelectionView.get_billing_address_form方法的典型用法代码示例。如果您正苦于以下问题:Python CheckoutSelectionView.get_billing_address_form方法的具体用法?Python CheckoutSelectionView.get_billing_address_form怎么用?Python CheckoutSelectionView.get_billing_address_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在shop.views.checkout.CheckoutSelectionView的用法示例。


在下文中一共展示了CheckoutSelectionView.get_billing_address_form方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_billing_address_cache

# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import get_billing_address_form [as 别名]
    def test_billing_address_cache(self):
        setattr(self.request, 'method', 'POST')
        setattr(self.request, 'POST', {})

        view = CheckoutSelectionView(request=self.request)
        res = view.get_billing_address_form()
        self.assertNotEqual(res, None)
        res2 = view.get_billing_address_form()
        self.assertEqual(res, res2)
开发者ID:albeirochoa,项目名称:django-shop,代码行数:11,代码来源:views_checkout.py

示例2: test_billing_address_form_post

# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import get_billing_address_form [as 别名]
    def test_billing_address_form_post(self):
        setattr(self.request, "method", "POST")
        setattr(self.request, "POST", {})

        view = CheckoutSelectionView(request=self.request)
        res = view.get_billing_address_form()
        self.assertNotEqual(res, None)
开发者ID:ronkhan,项目名称:django-shop,代码行数:9,代码来源:views_checkout.py

示例3: test_billing_address_form_user_no_preset

# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import get_billing_address_form [as 别名]
 def test_billing_address_form_user_no_preset(self):
     setattr(self.request, 'user', self.user)
     
     address = Address.objects.create(country=self.country, user_billing=self.user)
     address.save()
     
     view = CheckoutSelectionView(request=self.request)
     res = view.get_billing_address_form()
     self.assertEqual(res.instance, address)
开发者ID:KristianOellegaard,项目名称:django-shop,代码行数:11,代码来源:views_checkout.py

示例4: test_billing_address_form_user_preset

# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import get_billing_address_form [as 别名]
 def test_billing_address_form_user_preset(self):
     view = CheckoutSelectionView(request=self.request)
     res = view.get_billing_address_form()
     self.assertNotEqual(res, None)
开发者ID:albeirochoa,项目名称:django-shop,代码行数:6,代码来源:views_checkout.py


注:本文中的shop.views.checkout.CheckoutSelectionView.get_billing_address_form方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。