本文整理汇总了Python中test_factory.Factory.spreadsheet方法的典型用法代码示例。如果您正苦于以下问题:Python Factory.spreadsheet方法的具体用法?Python Factory.spreadsheet怎么用?Python Factory.spreadsheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test_factory.Factory
的用法示例。
在下文中一共展示了Factory.spreadsheet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _test_spreadsheet_download_200s_for_template_type
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import spreadsheet [as 别名]
def _test_spreadsheet_download_200s_for_template_type(self, template_type, file_type=None):
from spreadsheets.views import download
spreadsheet = Factory.spreadsheet(self.a1, template_type, file_type=file_type)
request = self.factory.get(
"%s?type=%s&spreadsheet_id=%s"
% (reverse("spreadsheets:download"), spreadsheet.default_filetype, spreadsheet.pk)
)
request.account = self.a1
response = download(request)
self.assertEqual(response.status_code, 200)
示例2: test_challenge_has_downloaded_spreadsheet
# 需要导入模块: from test_factory import Factory [as 别名]
# 或者: from test_factory.Factory import spreadsheet [as 别名]
def test_challenge_has_downloaded_spreadsheet(self):
Factory.spreadsheet(self.a1, SPREADSHEET_TEMPLATE_CHOICES[0][0])
self.a1.check_challenge_progress()
assert self.a1.challenge_has_downloaded_spreadsheet == True