本文整理汇总了Python中test_factory.Factory.rand_int方法的典型用法代码示例。如果您正苦于以下问题:Python Factory.rand_int方法的具体用法?Python Factory.rand_int怎么用?Python Factory.rand_int使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test_factory.Factory
的用法示例。
在下文中一共展示了Factory.rand_int方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_a_new_shift
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import rand_int [as 别名]
def add_a_new_shift(self, hours=None, date=None):
sel = self.selenium
if not hours:
hours = Factory.rand_int(1,10)
sel.click("css=tabbed_box[name=add_a_volunteer_shift] tab_title")
sel.type("css=#id_duration", hours)
if date:
sel.type("css=#id_date", date)
sel.click("css=tabbed_box[name=add_a_volunteer_shift] .add_shift_btn")
time.sleep(2)
示例2: setUp
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import rand_int [as 别名]
def setUp(self, *args, **kwargs):
self.account = self.setup_for_logged_in()
populate_rule_components_for_an_account(self.account)
self.people = [Factory.volunteer_history(self.account) for i in range(1,Factory.rand_int(30,100))]
self.verificationErrors = []
示例3: setUp
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import rand_int [as 别名]
def setUp(self, *args, **kwargs):
self.account = self.setup_for_logged_in()
self.organizations = [Factory.organization(self.account) for i in range(1,Factory.rand_int(30,300))]
self.verificationErrors = []
示例4: test_factory_account_can_be_run_multiple_times
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import rand_int [as 别名]
def test_factory_account_can_be_run_multiple_times(self):
for i in range(0,Factory.rand_int(2,6)):
Factory.create_demo_site("test%s" % i, quick=True)
assert True == True # Finished successfully.