mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 16:51:54 +00:00
debug op
This commit is contained in:
parent
69ce1d91f3
commit
f36f10d903
@ -255,10 +255,9 @@ class PostTests(TestCase):
|
|||||||
response = self.client.post("/photoupload/", data={"photographer": "GussieFinkNottle"})
|
response = self.client.post("/photoupload/", data={"photographer": "GussieFinkNottle"})
|
||||||
content = response.content.decode()
|
content = response.content.decode()
|
||||||
self.assertEqual(response.status_code, HTTPStatus.OK)
|
self.assertEqual(response.status_code, HTTPStatus.OK)
|
||||||
self.assertEqual(response.status_code, HTTPStatus.OK)
|
|
||||||
# with open('_test_response.html', 'w') as f:
|
# with open('_test_response.html', 'w') as f:
|
||||||
# f.write(content)
|
# 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)
|
phmatch = re.search(ph, content)
|
||||||
self.assertIsNotNone(phmatch, "Failed to find expected text: '" + ph + "'")
|
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
|
# 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"
|
remove_dir = pathlib.Path(settings.PHOTOS_ROOT, current_year) / "GussieFinkNottle"
|
||||||
if remove_dir.is_dir():
|
if remove_dir.is_dir():
|
||||||
|
print(f"{remove_dir} was created, now removing it.")
|
||||||
remove_dir.rmdir()
|
remove_dir.rmdir()
|
||||||
|
|
||||||
def test_dwg_upload_txt(self):
|
def test_dwg_upload_txt(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user