本文整理汇总了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)