本文整理匯總了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