forked from expo/troggle
delete test upload file after test
This commit is contained in:
@@ -151,7 +151,6 @@ class PostTests(TestCase):
|
||||
)
|
||||
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 [
|
||||
@@ -165,9 +164,10 @@ class PostTests(TestCase):
|
||||
self.assertIsNotNone(phmatch, "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.SCANS_ROOT) / f'{testyear}' / f'{testyear}#00'/ 'test_upload_file.txt'
|
||||
# remove_file.unlink()
|
||||
# # Undo the auto create and commit of a new wallet
|
||||
remove_file = pathlib.Path(settings.SCANS_ROOT) / f'{testyear}' / f'{testyear}#00'/ 'test_upload_file.txt'
|
||||
remove_file.unlink()
|
||||
|
||||
# # Undo the auto create and commit of a new wallet. Why is the commit not happening when we run the test?
|
||||
# cwd = settings.DRAWINGS_DATA
|
||||
# sp = subprocess.run([settings.GIT, "reset", "--hard", "master^"], cwd=cwd, capture_output=True, text=True)
|
||||
# print(f'git output: {cwd}:\n # {sp.stderr=}\n # {sp.stdout=} \n # return code: {str(sp.returncode)}')
|
||||
|
||||
Reference in New Issue
Block a user