forked from expo/troggle
stop file logging from tests
This commit is contained in:
parent
8f89b022c7
commit
1a4be0f02e
@ -170,8 +170,8 @@ class PageTests(TestCase):
|
|||||||
ph = r'All Survey scans folders '
|
ph = r'All Survey scans folders '
|
||||||
content = response.content.decode()
|
content = response.content.decode()
|
||||||
phmatch = re.search(ph, content)
|
phmatch = re.search(ph, content)
|
||||||
with open('ss-op.html', 'w') as f:
|
# with open('ss-op.html', 'w') as f:
|
||||||
f.write(content)
|
# f.write(content)
|
||||||
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ class FixturePageTests(TestCase):
|
|||||||
|
|
||||||
content = response.content.decode()
|
content = response.content.decode()
|
||||||
phmatch = re.search(ph, content)
|
phmatch = re.search(ph, content)
|
||||||
with open('exped-op.html', 'w') as f:
|
# with open('exped-op.html', 'w') as f:
|
||||||
f.write(content)
|
# f.write(content)
|
||||||
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
||||||
|
|
||||||
|
|
||||||
@ -103,8 +103,8 @@ class FixturePageTests(TestCase):
|
|||||||
|
|
||||||
content = response.content.decode()
|
content = response.content.decode()
|
||||||
phmatch = re.search(ph, content)
|
phmatch = re.search(ph, content)
|
||||||
with open('persexped-op.html', 'w') as f:
|
# with open('persexped-op.html', 'w') as f:
|
||||||
f.write(content)
|
# f.write(content)
|
||||||
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
||||||
|
|
||||||
def test_fix_person(self):
|
def test_fix_person(self):
|
||||||
@ -115,8 +115,8 @@ class FixturePageTests(TestCase):
|
|||||||
|
|
||||||
content = response.content.decode()
|
content = response.content.decode()
|
||||||
phmatch = re.search(ph, content)
|
phmatch = re.search(ph, content)
|
||||||
with open('person-op.html', 'w') as f:
|
# with open('person-op.html', 'w') as f:
|
||||||
f.write(content)
|
# f.write(content)
|
||||||
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
||||||
|
|
||||||
|
|
||||||
@ -138,8 +138,8 @@ class FixturePageTests(TestCase):
|
|||||||
|
|
||||||
content = response.content.decode()
|
content = response.content.decode()
|
||||||
phmatch = re.search(ph, content)
|
phmatch = re.search(ph, content)
|
||||||
with open('cave-op.html', 'w') as f:
|
# with open('cave-op.html', 'w') as f:
|
||||||
f.write(content)
|
# f.write(content)
|
||||||
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
|
||||||
|
|
||||||
def test_fix_cave_bare_url115(self):
|
def test_fix_cave_bare_url115(self):
|
||||||
|
@ -56,8 +56,8 @@ class FixturePageTests(TestCase):
|
|||||||
|
|
||||||
response = c.get('/admin/')
|
response = c.get('/admin/')
|
||||||
content = response.content.decode()
|
content = response.content.decode()
|
||||||
with open('admin-op.html', 'w') as f:
|
# with open('admin-op.html', 'w') as f:
|
||||||
f.write(content)
|
# f.write(content)
|
||||||
t = re.search(r'Troggle administration', content)
|
t = re.search(r'Troggle administration', content)
|
||||||
self.assertIsNone(t, 'Logged in as \'' + u.username + '\' (not staff) but still managed to get the Admin page' )
|
self.assertIsNone(t, 'Logged in as \'' + u.username + '\' (not staff) but still managed to get the Admin page' )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user