2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-22 07:11:52 +00:00
This commit is contained in:
Philip Sargent 2024-07-05 00:28:48 +03:00
parent 69ce1d91f3
commit f36f10d903

View File

@ -255,10 +255,9 @@ class PostTests(TestCase):
response = self.client.post("/photoupload/", data={"photographer": "GussieFinkNottle"})
content = response.content.decode()
self.assertEqual(response.status_code, HTTPStatus.OK)
self.assertEqual(response.status_code, HTTPStatus.OK)
# with open('_test_response.html', 'w') as f:
# f.write(content)
for ph in [r"/GussieFinkNottle/", r"Create new Photographer folder"]:
for ph in [r"Create new Photographer folder", r"/GussieFinkNottle/"]:
phmatch = re.search(ph, content)
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")
@ -266,6 +265,7 @@ class PostTests(TestCase):
# added each time it is run. The name of the uploaded file is only available within the code where it happens
remove_dir = pathlib.Path(settings.PHOTOS_ROOT, current_year) / "GussieFinkNottle"
if remove_dir.is_dir():
print(f"{remove_dir} was created, now removing it.")
remove_dir.rmdir()
def test_dwg_upload_txt(self):