本文整理汇总了Python中test_factory.Factory.test_cc_number方法的典型用法代码示例。如果您正苦于以下问题:Python Factory.test_cc_number方法的具体用法?Python Factory.test_cc_number怎么用?Python Factory.test_cc_number使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test_factory.Factory
的用法示例。
在下文中一共展示了Factory.test_cc_number方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_that_after_signup_users_can_change_their_billing_info
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import test_cc_number [as 别名]
def test_that_after_signup_users_can_change_their_billing_info(self):
# And see it updated.
sel = self.selenium
self.get_logged_in()
self.go_to_the_account_page()
self.enter_billing_info_signup()
assert sel.is_text_present("XXXX-XXXX-XXXX-%s" % (Factory.test_cc_number(True)[-4:]))
self.enter_billing_info_signup(cc_number="4222222222222")
assert not sel.is_text_present("XXXX-XXXX-XXXX-%s" % (Factory.test_cc_number(True)[-4:]))
assert sel.is_text_present("XXXX-XXXX-XXXX-2222")
示例2: test_that_new_signups_can_sign_up_for_an_account
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import test_cc_number [as 别名]
def test_that_new_signups_can_sign_up_for_an_account(self):
sel = self.selenium
self.get_logged_in()
self.go_to_the_account_page()
self.enter_billing_info_signup()
assert sel.is_text_present("Status: Free Trial")
assert sel.is_text_present("XXXX-XXXX-XXXX-%s" % (Factory.test_cc_number(True)[-4:]))
assert sel.is_text_present("Signup Date: %s" % (date(datetime.date.today()),) )
assert sel.is_element_present("link=Update Billing Information")
示例3: enter_billing_info_signup
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import test_cc_number [as 别名]
def enter_billing_info_signup(self, valid_cc=True, cc_number=None):
"""Assumes you're starting on the manage acct page"""
if not cc_number:
cc_number = Factory.test_cc_number(valid_cc)
sel = self.selenium
sel.click("link=Update Billing Information")
sel.type("css=#id_card_number",cc_number)
sel.type("css=#id_card_cvv","123")
sel.select("css=#id_card_expiry_month","May")
sel.select("css=#id_card_expiry_year","2020")
sel.click("css=#subscription_submit")
if valid_cc:
sel.wait_for_page_to_load("30000")
else:
time.sleep(6)