本文整理汇总了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
})
示例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
})
示例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
})
示例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
})
示例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"]'}
示例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
示例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})
示例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})
示例9: setUp
# 需要导入模块: from test_base import TestBase [as 别名]
# 或者: from test_base.TestBase import setUp [as 别名]
def setUp(self):
TestBase.setUp(self)
示例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)
示例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})
示例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)
示例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)
示例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()