本文整理匯總了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.