本文整理汇总了Python中views.app.test_client函数的典型用法代码示例。如果您正苦于以下问题:Python test_client函数的具体用法?Python test_client怎么用?Python test_client使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了test_client函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
app.config['TESTING'] = True
app.config['WTF_CSRF_ENABLED'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + \
os.path.join(basedir, TEST_DB)
self.app = app.test_client()
db.create_all()
开发者ID:robertdavidwest,项目名称:RealPython,代码行数:7,代码来源:test.py
示例2: setUp
def setUp(self):
app.config['TESTING'] = True
db.drop_all()
db.create_all()
self.client = app.test_client()
#add basic data to database
new_drug = drug(DRUGid='e28b7d9c-e817-47c1-b227-97d8eca021a7',\
code='2062', name='杏仁', unit='克', alias=' ',\
py='xr', wb='sw', isClassical='1', SPETid=' ',\
illustration='', createDay='2008-03-25 01=42=59.000',\
optrid='c6543358-354b-4986-a06f-bd61b0cde15d', state='3')
db.session.add(new_drug)
new_fixedrecipe = fixedrecipe(FREPid='65dd5753-aad0-4261-94d3-09a67bd4f9a1',\
code='378', name='华盖散', effect='', py='HGS', wb='WUA', isClassical='1',\
SPETid=' ', illustration='', createDay='2008-03-25 02:05:10.000',\
optrid='c6543358-354b-4986-a06f-bd61b0cde15d', state='3')
db.session.add(new_fixedrecipe)
new_fixedrecipeItem = fixedrecipeItem(FRITid='9c18a29f-faa1-494d-839c-7a89cba439e8',\
DRUGid='e28b7d9c-e817-47c1-b227-97d8eca021a7',\
FREPid='65dd5753-aad0-4261-94d3-09a67bd4f9a1',\
quality='9.0000', sequence='0', illustration='')
db.session.add(new_fixedrecipeItem)
db.session.commit()
开发者ID:cyxtj,项目名称:veterans,代码行数:27,代码来源:test.py
示例3: setUp
def setUp(self):
app.config['TESTING'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + \
os.path.join(basedir, TEST_DIR)
self.app = app.test_client()
db.create_all()
self.michaelUser = ('Michael', '[email protected]', 'python', 'python')
开发者ID:smifun,项目名称:python-learning,代码行数:8,代码来源:test_users.py
示例4: setUp
def setUp(self):
"""Set up."""
app.config['TESTING'] = True
app.config['WTF_CSRF_ENABLED'] = False
app.config['DEBUG'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + \
os.path.join(basedir, TEST_DB)
self.app = app.test_client()
db.create_all()
self.assertEquals(app.debug, False)
开发者ID:powerlanguage,项目名称:mog,代码行数:11,代码来源:tests.py
示例5: setUp
def setUp(self):
"""
Executing prior to each tasks.
Create environnement where tests while be executing.
"""
app.config['TESTING'] = True
app.config['WTF_CSRF_ENABLED'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + \
os.path.join(basedir, TEST_DB)
self.app = app.test_client()
db.create_all()
开发者ID:Pampipampupampa,项目名称:RealPython_NoDeploy,代码行数:11,代码来源:test_users.py
示例6: setup
def setup(self):
self.app = app.test_client()
开发者ID:bebound,项目名称:review,代码行数:2,代码来源:review_test.py
示例7: setUp
def setUp(self):
app.config['TESTING'] = True
db.drop_all()
db.create_all()
self.client = app.test_client()
开发者ID:cyxtj,项目名称:webmed_test,代码行数:5,代码来源:test.py
示例8: setUp
def setUp(self):
self.app = app.test_client()
self.maxDiff = None
开发者ID:KanwarGill,项目名称:NewsInvestigator,代码行数:3,代码来源:tests.py
注:本文中的views.app.test_client函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论