forked from expo/troggle
pathlib updates
This commit is contained in:
@@ -132,14 +132,25 @@ class PageTests(TestCase):
|
||||
phrase = re.search(r'Phil Wigglesworth', content)
|
||||
phrase = re.search(r'A more obscure record of longest gap between expos has', content)
|
||||
|
||||
def test_page_expofile(self):
|
||||
def test_page_expofile_document(self):
|
||||
# Flat file tests.
|
||||
response = self.client.get('/expofiles/documents/surveying/tunnel-loefflerCP35-only.pdf')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(len(response.content), 2299270)
|
||||
if response.status_code != 200:
|
||||
self.assertEqual(response.status_code, 302)
|
||||
if response.status_code != 302:
|
||||
self.assertEqual(response.status_code, 200)
|
||||
print(response)
|
||||
print(response.content)
|
||||
self.assertEqual(len(response.content), 2299270) # fails, but is working manually!
|
||||
|
||||
def test_page_expofile_writeup(self):
|
||||
# Flat file tests.
|
||||
response = self.client.get('/expofiles/writeups/1982/logbook1982.pdf')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(len(response.content), 12915413)
|
||||
if response.status_code != 200:
|
||||
self.assertEqual(response.status_code, 302)
|
||||
if response.status_code != 302:
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(len(response.content), 12915413) # fails, but is working manually!
|
||||
|
||||
|
||||
def test_page_ss(self):
|
||||
|
||||
@@ -2,9 +2,9 @@ import django
|
||||
from django import template
|
||||
|
||||
register = template.Library()
|
||||
if django.VERSION[0] >=1 and django.VERSION[1] > 1:
|
||||
pass
|
||||
else:
|
||||
# if django.VERSION[0] >=1 and django.VERSION[1] > 1:
|
||||
# pass
|
||||
# else:
|
||||
|
||||
@register.simple_tag
|
||||
def csrf_token(): return ""
|
||||
# @register.simple_tag
|
||||
# def csrf_token(): return ""
|
||||
|
||||
Reference in New Issue
Block a user