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


Python Factory.rand_int方法代码示例

本文整理汇总了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)
开发者ID:skoczen,项目名称:mycelium,代码行数:13,代码来源:selenium_abstractions.py

示例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 = []
开发者ID:skoczen,项目名称:mycelium,代码行数:7,代码来源:selenium_tests.py

示例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 = []
开发者ID:skoczen,项目名称:mycelium,代码行数:6,代码来源:selenium_tests.py

示例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.        
开发者ID:skoczen,项目名称:mycelium,代码行数:7,代码来源:unit_tests.py


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