diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-03-22 17:57:48 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-03-22 17:57:48 +0000 |
commit | dd321146986212a0be374442ec964be5ee16bf80 (patch) | |
tree | 254e5feeab226ba756a55fbdfc27e1e9e894ba9d /core/TESTS/test_logins.py | |
parent | 5f46d8fdc50918551dcc50d172e0558c209b495c (diff) | |
download | troggle-dd321146986212a0be374442ec964be5ee16bf80.tar.gz troggle-dd321146986212a0be374442ec964be5ee16bf80.tar.bz2 troggle-dd321146986212a0be374442ec964be5ee16bf80.zip |
delete test upload file after test
Diffstat (limited to 'core/TESTS/test_logins.py')
-rw-r--r-- | core/TESTS/test_logins.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/TESTS/test_logins.py b/core/TESTS/test_logins.py index f50e292..e17ad43 100644 --- a/core/TESTS/test_logins.py +++ b/core/TESTS/test_logins.py @@ -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)}') |