mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 23:01:52 +00:00
delete test upload file after test
This commit is contained in:
parent
5f46d8fdc5
commit
dd32114698
@ -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)}')
|
||||
|
@ -401,7 +401,7 @@ def walletedit(request, path=None):
|
||||
def save_json(jsondict):
|
||||
# print(f'--- Wallet directory in :drawings: repo {newfolder=} {jsondict}')
|
||||
if not os.path.exists(contents_path.parent):
|
||||
print("--- No wallet directory in :drawings: repo, so creating it")
|
||||
print(f"--- No wallet directory in :drawings: repo, so creating it {contents_path.parent}")
|
||||
os.makedirs(contents_path.parent)
|
||||
|
||||
with open(contents_path, "w") as jfile:
|
||||
|
Loading…
Reference in New Issue
Block a user