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


Python Contacts.change_contact方法代码示例

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


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

示例1: test_main

# 需要导入模块: from OWDTestToolkit.apps.contacts import Contacts [as 别名]
# 或者: from OWDTestToolkit.apps.contacts.Contacts import change_contact [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)

        # Create test contacts.
        self.test_contacts = [MockContact() for i in range(2)]
        map(self.UTILS.general.insertContact, self.test_contacts)
        self.new_given_name = "aaaaabbbbbccccaaaa"

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Set up to use data connection.
        self.connect_to_network()

        # Launch contacts app.
        self.contacts.launch()

        # Change the name to "aaaaabbbbbccccaaaa"
        self.contacts.change_contact(self.test_contacts[0]['name'], "givenName",
                                    self.new_given_name)

        # Search for our new contact.
        self.contacts.search("aaa")

        # Verify our contact is listed.
        self.contacts.check_search_results(self.new_given_name, True)

        # Verify the other contact is NOT listed.
        self.contacts.check_search_results(self.test_contacts[1]["givenName"], False)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:41,代码来源:test_26901.py


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