mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-19 03:59:13 -04:00
Fix CLI tests
This commit is contained in:
parent
c8ba508d26
commit
b3d53ca2f2
4 changed files with 46 additions and 32 deletions
|
@ -54,7 +54,7 @@ class TestSettings:
|
|||
"socks_port": 9999,
|
||||
"use_stealth": True,
|
||||
}
|
||||
tmp_file, tmp_file_path = tempfile.mkstemp(dir=temp_dir)
|
||||
tmp_file, tmp_file_path = tempfile.mkstemp(dir=temp_dir.name)
|
||||
with open(tmp_file, "w") as f:
|
||||
json.dump(custom_settings, f)
|
||||
settings_obj.filename = tmp_file_path
|
||||
|
@ -69,7 +69,7 @@ class TestSettings:
|
|||
|
||||
def test_save(self, monkeypatch, temp_dir, settings_obj):
|
||||
settings_filename = "default_settings.json"
|
||||
new_temp_dir = tempfile.mkdtemp(dir=temp_dir)
|
||||
new_temp_dir = tempfile.mkdtemp(dir=temp_dir.name)
|
||||
settings_path = os.path.join(new_temp_dir, settings_filename)
|
||||
settings_obj.filename = settings_path
|
||||
settings_obj.save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue