mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-03 23:15:18 -04:00
Fix persistence tests, re-introduce separate settings json files, fix call to actual tests to use self. These can now be run with 'xvfb-run pytest tests_gui_local/' instead of via a shell script
This commit is contained in:
parent
297edbe637
commit
7d8a47a53a
11 changed files with 39 additions and 66 deletions
|
@ -24,6 +24,11 @@ class GuiShareTest(GuiBaseTest):
|
|||
# We should have timed out now
|
||||
self.assertEqual(mode.server_status.status, 0)
|
||||
|
||||
# Persistence tests
|
||||
def have_same_slug(self, slug):
|
||||
'''Test that we have the same slug'''
|
||||
self.assertEqual(self.gui.share_mode.server_status.web.slug, slug)
|
||||
|
||||
# Share-specific tests
|
||||
|
||||
def file_selection_widget_has_a_file(self):
|
||||
|
@ -143,6 +148,15 @@ class GuiShareTest(GuiBaseTest):
|
|||
self.run_all_share_mode_download_tests(public_mode, stay_open)
|
||||
|
||||
|
||||
def run_all_share_mode_persistent_tests(self, public_mode, stay_open):
|
||||
"""Same as end-to-end share tests but also test the slug is the same on multiple shared"""
|
||||
self.run_all_share_mode_setup_tests()
|
||||
self.run_all_share_mode_started_tests(public_mode)
|
||||
slug = self.gui.share_mode.server_status.web.slug
|
||||
self.run_all_share_mode_download_tests(public_mode, stay_open)
|
||||
self.have_same_slug(slug)
|
||||
|
||||
|
||||
def run_all_share_mode_timer_tests(self, public_mode):
|
||||
"""Auto-stop timer tests in share mode"""
|
||||
self.run_all_share_mode_setup_tests()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue