mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 23:07:07 +00:00
bugfix in photo upload, untidy
This commit is contained in:
@@ -206,12 +206,12 @@ class PostTests(TestCase):
|
||||
with open('core/fixtures/test_upload_nosuffix','r') as testf:
|
||||
response = self.client.post('/dwguploadnogit/uploads', data={'name': 'test_upload_nosuffix', 'uploadfiles': testf })
|
||||
content = response.content.decode()
|
||||
with open('_test_response.html', 'w') as f:
|
||||
f.write(content)
|
||||
# with open('_test_response.html', 'w') as f:
|
||||
# f.write(content)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
for ph in [ r'test_upload_nosuffix',
|
||||
r'You cannot create folders here',
|
||||
r'Clicking on a filename only']:
|
||||
r'Creating a folder is done by a nerd']:
|
||||
phmatch = re.search(ph, content)
|
||||
self.assertIsNotNone(phmatch, "Expect no-suffix file to upload OK. Failed to find expected text: '" + ph +"'")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user