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


Python TestBase.setUp方法代码示例

本文整理汇总了Python中test_base.TestBase.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python TestBase.setUp方法的具体用法?Python TestBase.setUp怎么用?Python TestBase.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在test_base.TestBase的用法示例。


在下文中一共展示了TestBase.setUp方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     s = 'transport_2011-07-25_19-05-49'
     self._make_submission(os.path.join(
         self.this_directory, 'fixtures',
         'transportation', 'instances', s, s + '.xml'))
     self.submission = self.xform.instances.reverse()[0]
     self.url = reverse(map_view, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string})
     self.perm_url = reverse(set_perm, kwargs={
         'username': self.user.username, 'id_string': self.xform.id_string})
     self.edit_url = reverse(edit, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
     self.show_url = reverse(show, kwargs={'uuid': self.xform.uuid})
     self.show_normal_url = reverse(show, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
     self.api_url = reverse(api, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
开发者ID:199212151746,项目名称:onadata,代码行数:29,代码来源:test_form_permissions.py

示例2: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.public_api_url = reverse(public_api, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
开发者ID:cagulas,项目名称:onadata,代码行数:10,代码来源:test_form_public_api.py

示例3: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     self.url = reverse(show, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
开发者ID:Azique,项目名称:kobocat,代码行数:10,代码来源:test_form_show.py

示例4: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.perm_url = reverse(set_perm, kwargs={
         'username': self.user.username, 'id_string': self.xform.id_string})
     self.show_url = reverse(show, kwargs={'uuid': self.xform.uuid})
     self.url = reverse(enter_data, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
开发者ID:iMMAP,项目名称:onadata,代码行数:13,代码来源:test_form_enter_data.py

示例5: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
     self.delete_url = reverse(delete_data, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     })
     self.mongo_args = {
         'username': self.user.username, 'id_string': self.xform.id_string,
         'query': "{}", 'limit': 1,
         'sort': '{"_id":-1}', 'fields': '["_id","_uuid"]'}
开发者ID:199212151746,项目名称:onadata,代码行数:14,代码来源:test_form_api_delete.py

示例6: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
    def setUp(self):
        TestBase.setUp(self)
        self._create_user_and_login()
        self._publish_transportation_form()

        # turn on crowd forms for this form
        self.xform.is_crowd_form = True
        self.xform.save()
        self.edit_url = reverse(edit, kwargs={
            'username': self.xform.user.username,
            'id_string': self.xform.id_string
        })
        self.alice = 'alice'
        self.crowdform_count = 0
开发者ID:cagulas,项目名称:onadata,代码行数:16,代码来源:test_crowdforms.py

示例7: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self.settings_url = reverse(
         profile_settings, kwargs={'username': self.user.username})
开发者ID:BhimAle,项目名称:FormShare,代码行数:6,代码来源:test_user_settings.py

示例8: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form()
     self.url = reverse(clone_xlsform,
                        kwargs={'username': self.user.username})
开发者ID:Azique,项目名称:kobocat,代码行数:8,代码来源:test_form_gallery.py

示例9: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
开发者ID:BhimAle,项目名称:FormShare,代码行数:4,代码来源:test_form_auth.py

示例10: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self.homepage = Homepage(self.driver, self.wait, fresh_load=True)
开发者ID:cbalea,项目名称:Needle,代码行数:5,代码来源:test_shanghai.py

示例11: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login('bob', 'bob')
     self._publish_transportation_form()
     self.url = reverse(formList, kwargs={'username': self.user.username})
开发者ID:cagulas,项目名称:onadata,代码行数:7,代码来源:test_form_auth.py

示例12: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
   TestBase.setUp(self)
   self.app = webtest.TestApp(app)
开发者ID:customelements,项目名称:v2,代码行数:5,代码来源:api_test.py

示例13: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self.setup_form(allow_sms=False)
开发者ID:ACTillage,项目名称:formhub,代码行数:5,代码来源:test_notallowed.py

示例14: setUp

# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
 def setUp(self):
     TestBase.setUp(self)
     self._create_user_and_login()
     self._publish_transportation_form_and_submit_instance()
开发者ID:MichaelRoethlin,项目名称:onadata,代码行数:6,代码来源:test_metadata.py


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