summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-04-20 21:22:38 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-04-20 21:22:38 +0300
commit00eb978f5fb043b6fe50e5a5988fde3ec4d3c488 (patch)
treea0dec0232d99de93c1593c7cb607666e5a5084c4
parentc9931fd45eaa0b05d1bce37d471e873b0955c125 (diff)
downloadtroggle-00eb978f5fb043b6fe50e5a5988fde3ec4d3c488.tar.gz
troggle-00eb978f5fb043b6fe50e5a5988fde3ec4d3c488.tar.bz2
troggle-00eb978f5fb043b6fe50e5a5988fde3ec4d3c488.zip
fixed test broken by recent update
-rw-r--r--.gitignore1
-rw-r--r--core/TESTS/tests_logins.py10
2 files changed, 6 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 742d605..0e3f13b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -125,3 +125,4 @@ media/jslib/openlayers/Lang/te.js
media/jslib/openlayers/Lang/vi.js
media/jslib/openlayers/Lang/zh-CN.js
media/jslib/openlayers/Lang/zh-TW.js
+_test_response.html
diff --git a/core/TESTS/tests_logins.py b/core/TESTS/tests_logins.py
index 513e69d..c6cf962 100644
--- a/core/TESTS/tests_logins.py
+++ b/core/TESTS/tests_logins.py
@@ -202,14 +202,14 @@ 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'Upload more',
- r' saved as ',
+ for ph in [ r'test_upload_nosuffix',
+ r'You cannot create folders here',
r'Clicking on a filename only']:
phmatch = re.search(ph, content)
- self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph +"'")
+ self.assertIsNotNone(phmatch, "Expect no-suffix file to upload OK. Failed to find expected text: '" + ph +"'")
# Does not use the filename Django actually uses, assumes it is unchanged. Potential bug.
remove_file = pathlib.Path(settings.DRAWINGS_DATA) / 'uploads' / 'test_upload_nosuffix'