mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-25 15:29:42 -05:00
Fix GUI tests
This commit is contained in:
parent
8b9d9fcf46
commit
ce7f676527
@ -583,8 +583,11 @@ class ReceiveModeRequest(Request):
|
||||
self.web.receive_mode.uploads_in_progress.remove(history_id)
|
||||
|
||||
# If no files were written to self.receive_mode_dir, delete it
|
||||
if len(os.listdir(self.receive_mode_dir)) == 0:
|
||||
os.rmdir(self.receive_mode_dir)
|
||||
try:
|
||||
if len(os.listdir(self.receive_mode_dir)) == 0:
|
||||
os.rmdir(self.receive_mode_dir)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def file_write_func(self, filename, length):
|
||||
"""
|
||||
|
@ -54,9 +54,9 @@ class TestReceive(GuiBaseTest):
|
||||
for _ in range(10):
|
||||
date_dir = now.strftime("%Y-%m-%d")
|
||||
if identical_files_at_once:
|
||||
time_dir = now.strftime("%H.%M.%S-1")
|
||||
time_dir = now.strftime("%H%M%S-1")
|
||||
else:
|
||||
time_dir = now.strftime("%H.%M.%S")
|
||||
time_dir = now.strftime("%H%M%S")
|
||||
receive_mode_dir = os.path.join(
|
||||
tab.settings.get("receive", "data_dir"), date_dir, time_dir
|
||||
)
|
||||
@ -115,7 +115,6 @@ class TestReceive(GuiBaseTest):
|
||||
self.have_copy_url_button(tab)
|
||||
self.have_show_qr_code_button(tab)
|
||||
self.server_status_indicator_says_started(tab)
|
||||
self.web_page(tab, "Select the files you want to send, then click")
|
||||
|
||||
def run_all_receive_mode_tests(self, tab):
|
||||
"""Upload files in receive mode and stop the share"""
|
||||
|
Loading…
Reference in New Issue
Block a user