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


Python SalesManagement.contact_us_about_item方法代码示例

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


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

示例1: test_contact_us_about_item

# 需要导入模块: from shiba.salesmanagement import SalesManagement [as 别名]
# 或者: from shiba.salesmanagement.SalesManagement import contact_us_about_item [as 别名]
def test_contact_us_about_item(connection):
    """contact_us_about_item on an unknown product, must fail"""
    sales_management = SalesManagement(connection)
    obj = None
    try:
        obj = sales_management.contact_us_about_item("1337", "message", "1337")
    except ShibaServiceError:
        pass
    assert obj is None
开发者ID:tboulogne,项目名称:shiba,代码行数:11,代码来源:test_salesmanagement.py

示例2: test_contact_us_about_item

# 需要导入模块: from shiba.salesmanagement import SalesManagement [as 别名]
# 或者: from shiba.salesmanagement.SalesManagement import contact_us_about_item [as 别名]
def test_contact_us_about_item(monkeypatch):
    """contact_us_about_item test"""
    monkeypatch.setattr("requests.get", make_requests_get_mock("sample_contactus.xml"))
    sales_management = SalesManagement(ShibaConnection("test", "test", "https://ws.sandbox.priceminister.com"))
    obj = sales_management.contact_us_about_item("1337", "message", "1337")
    assert obj.content.tag == "contactusaboutitemresult"
开发者ID:Phylante,项目名称:shiba,代码行数:8,代码来源:test_salesmanagement.py

示例3: SalesManagementTest

# 需要导入模块: from shiba.salesmanagement import SalesManagement [as 别名]
# 或者: from shiba.salesmanagement.SalesManagement import contact_us_about_item [as 别名]

#.........这里部分代码省略.........
        except ShibaCallingError:
            pass
        obj = self.init.get_current_sales(purchasedate="WRONGDATE")
        self.assertTrue(elem.content.tag is not "purchasedate" for elem in obj.content.response)
        obj = self.init.get_current_sales(purchasedate="2012-12-21")
        self.assertEqual("21/12/2012", obj.content.request.purchasedate)

    def test_get_billing_information(self):
        """get_billing_information test, will raise an error due to unknown purchaseid"""
        obj = None
        try:
            obj = self.init.get_billing_information("1337")
        except ShibaServiceError:
            pass
        self.assertIsNone(obj)

    def test_get_shipping_information(self):
        """get_billing_information test, will raise an error due to unknown purchaseid"""
        obj = None
        try:
            obj = self.init.get_shipping_information("1337")
        except ShibaServiceError:
            pass
        self.assertIsNone(obj)

    def test_get_items_todo_list(self):
        """get_items_todo_list routine test"""
        obj = self.init.get_item_todo_list()
        self.assertIn("getitemtodolistresult", obj.content.tag)

    def test_get_item_infos(self):
        """get_item_infos on a unknown product, must fail"""
        obj = None
        try:
            obj = self.init.get_item_infos("181063")
        except ShibaServiceError:
            pass
        self.assertIsNone(obj)

    def test_cancel_item(self):
        """cancel_item on an unknown product, must fail"""
        obj = None
        try:
            obj = self.init.cancel_item("1337", "comment")
        except ShibaServiceError:
            pass
        self.assertIsNone(obj)

    def test_contact_us_about_item(self):
        """contact_us_about_item on an unknown product, must fail"""
        obj = None
        try:
            obj = self.init.contact_us_about_item("1337", "message", "1337")
        except ShibaServiceError:
            pass
        self.assertIsNone(obj)

    def test_contact_user_about_item(self):
        """contact_user_about_item on an unknown product, must fail"""
        obj = None
        try:
            obj = self.init.contact_user_about_item("1337", "message")
        except ShibaServiceError:
            pass
        self.assertIsNone(obj)

    def test_set_tracking_package_infos(self):
        """set_tracking_package_infos on an unknown product, must fail. Testing internal error catching as well."""
        obj = None
        try:
            obj = self.init.set_tracking_package_infos("1337", "UPS", "0000000000")
        except ShibaParameterError:
            pass
        self.assertIsNone(obj)
        try:
            obj = self.init.set_tracking_package_infos("1337", "Autre", "0000000000")
        except ShibaCallingError:
            pass
        self.assertIsNone(obj)

    def test_confirm_preorder(self):
        """confirm_preorder on an unknown advert, must fail. Testing internal error catching as well."""
        obj = None
        try:
            obj = self.init.confirm_preorder("1337", 1)
        except ShibaParameterError:
            pass
        self.assertIsNone(obj)
        try:
            obj = self.init.confirm_preorder("1337", -8)
        except ShibaCallingError:
            pass
        self.assertIsNone(obj)

    def test_wrong_user(self):
        wronginstance = SalesManagement(ShibaConnection("test", "test"))
        try:
            obj = wronginstance.get_new_sales()
        except ShibaLoginError:
            pass
开发者ID:Phylante,项目名称:shiba,代码行数:104,代码来源:test_salesmanagement.py


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