Micah Lee
334c3e1799
Delete the old tests and replace them with the new tests
2019-11-10 13:55:15 -08:00
Micah Lee
2afb443246
Fix settings test, now that we added the persistent_tabs setting
2019-11-02 23:36:37 -07:00
Micah Lee
1bc516f569
Remove mode settings from global settings object
2019-11-02 17:06:13 -07:00
Micah Lee
16268b5b3e
Fix CLI tests, and also fix bug related to autostop_sharing that the tests found
2019-11-02 17:01:47 -07:00
Micah Lee
0e44020bb6
Rename OnionShareGui to MainWindow
2019-10-20 19:41:20 -07:00
Micah Lee
58ad7907fd
Replace .format with python 3.6 f-strings in tests
2019-10-20 10:46:14 -07:00
Christian Clauss
5fccd41094
Use ==/!= to compare str, bytes, and int literals
...
https://docs.python.org/3/whatsnew/3.8.html#changes-in-python-behavior
The compiler now produces a SyntaxWarning when identity checks (is and is not) are used with certain types of literals (e.g. strings, numbers). These can often work by accident in CPython, but are not guaranteed by the language spec. The warning advises users to use equality tests (== and !=) instead.
2019-10-19 22:36:32 +02:00
Micah Lee
88e151d414
Format all code using black
2019-10-12 21:01:25 -07:00
Miguel Jacq
d83b75cc04
Invert the CSP header setting and put it in its own Website Mode settings group. Make the CSP header mandatory for share/receive modes, optional for website mode only.
2019-09-22 16:49:31 +10:00
Miguel Jacq
a0d4e2880f
Make setting the Content-Security-Policy header optional so it doesn't break website mode shares
2019-09-16 12:10:17 +10:00
Miguel Jacq
2c87ea55ff
Fix the discrepancy between SendBaseModeWeb and Web objects' separate cur_history_id attibutes, ensuring that when we call web.error404() we send a new history_id integer for communicating back to the frontend. Add tests for this
2019-09-09 16:35:05 +10:00
Miguel Jacq
4a4437394d
Fix tests in Receive Mode that actually do increment the history item widget count where they didn't previously (due to an additional GET that follows the 302 redirect of a POST request on upload)
2019-09-09 12:19:39 +10:00
Miguel Jacq
7a6d34103d
Reset the ToggleHistory indicator count/label when a share starts. Add a test for this
2019-09-03 17:02:29 +10:00
Miguel Jacq
04eabbb833
Check for the (absence of) hyperlink in page markup before we move on to trying to download the individual file
2019-09-03 12:38:20 +10:00
Miguel Jacq
174dc79a25
Test to make sure that we *can't* download an individual file when not in stay_open mode, not just that the hyperlink is not present in the page markup
2019-09-03 12:36:05 +10:00
Miguel Jacq
608e0eccc6
Extend coverage of website mode tests
2019-09-03 12:23:27 +10:00
Miguel Jacq
f4a6c2de01
Aww. Adjust the website test html code since my easter egg didn't work
2019-09-03 12:00:23 +10:00
Miguel Jacq
6da58edcda
remove unnecessary import from GuiWebSiteTest class
2019-09-03 11:53:17 +10:00
Miguel Jacq
93a63098de
Add a basic website test
2019-09-03 11:51:59 +10:00
Miguel Jacq
0abac29b09
Add tests to check that hyperlink to a shared file exists when in stay_open mode (and that the file is downloadable individually when so), and not if not
2019-09-03 11:19:42 +10:00
Micah Lee
113cd7eb4b
Remove the "Allow downloading individual files" setting altogether, and make it just automatically enabled if "Stop sharing..." is disabled
2019-09-01 21:22:59 -07:00
Micah Lee
833fd04ef0
Fix TestSettings.test_init test
2019-09-01 20:46:27 -07:00
Micah Lee
eb6909e33a
Make GuiReceiveTest.upload_test use basic auth when identical_files_at_once is True
2019-05-24 18:07:57 -07:00
Micah Lee
e820a0d00d
Fix tests
2019-05-24 17:59:14 -07:00
Micah Lee
1efc3d6278
Replace URLs that have slugs with basic auth in tests
2019-05-24 13:38:41 -07:00
Micah Lee
7e5bcf8662
Fix web tests to use basic auth and passwords instead of slugs
2019-05-23 09:53:18 -07:00
Micah Lee
cec63daf3a
Rename slugs to passwords in the tests
2019-05-22 20:55:31 -07:00
Micah Lee
4ea457ffe3
Merge pull request #959 from micahflee/958_verbose
...
Rename --debug to --verbose
2019-04-19 09:48:39 -07:00
Micah Lee
cd30db06eb
Skip GUI and tor tests if pytest is older than 2.9, to allow tests to run in old ubuntu
2019-04-18 20:38:44 -07:00
Micah Lee
d5c60f8f70
Rename debug to verbose in all relevant places
2019-04-18 19:53:21 -07:00
Miguel Jacq
eb823042bb
Standardise all startup_timer, scheduled_start attributes as 'autostart_timer'
2019-03-25 15:28:31 +11:00
Miguel Jacq
a4c8865dcd
Standardise all shutdown_timer, shutdown_timeout, timeout attributes as 'autostop_timer'
2019-03-25 15:05:54 +11:00
Miguel Jacq
f6f5ff0b7e
Fix conflicts
2019-03-25 13:43:08 +11:00
Micah Lee
06731ce56a
Merge pull request #935 from mig5/fix_receive_mode_folder_collision
...
On a folder name collision, make sure we update the self.receive_mode_dir attribute
2019-03-22 17:50:33 -07:00
Miguel Jacq
84aa627d1f
Various Startup Timer fixes for strings, bundled mode, stealth mode, startup/shutdown time clashes
2019-03-11 15:55:17 +11:00
Micah Lee
54fbe82d10
Merge pull request #926 from mig5/fix_settings_in_web_test
...
Use a custom Settings object in test_onionshare_web.py, rather than potentially load non-ephemeral settings
2019-03-10 13:58:11 -07:00
Miguel Jacq
188281e8d2
On a folder name collision, make sure we update the self.receive_mode_dir attribute after creating a unique folder with a suffix. Adjust Receive Mode tests to test for this
2019-03-08 12:54:10 +11:00
Miguel Jacq
eae049d46a
Fix a minor corner case related to server status button when canceling a scheduled share. Leverage scheduled shares in order to test 'cancel' action in local mode for better test coverage
2019-03-08 11:03:37 +11:00
Miguel Jacq
f124ccab7c
Prevent a scheduled share from starting after the scheduled time has passed. Add a test for this
2019-03-06 16:49:32 +11:00
Miguel Jacq
5deb9c460d
Test that the web server is stopped when it's scheduled for a later start
2019-03-05 16:59:13 +11:00
Miguel Jacq
26d262ccfc
Add a Startup Timer feature (scheduled start / dead man's switch)
2019-03-05 10:28:27 +11:00
Miguel Jacq
74e44f71b7
Use a custom Settings object in test_onionshare_web.py, rather than potentially load non-ephemeral settings
2019-02-26 11:10:09 +11:00
Miguel Jacq
5e37565783
remove actual sender_closed test function
2019-02-22 16:53:51 +11:00
Miguel Jacq
f1ec7d9381
Remove obsolete test for sender closing a Receive Mode service via the web interface
2019-02-22 16:50:40 +11:00
Miguel Jacq
174d821225
Support persistent v3 onions
2019-02-11 11:36:18 +11:00
Micah Lee
d68db75c68
Write test to confirm that submitting the receive mode form without selecting files doesn't change in_progress_count or completed_count
2019-01-21 17:11:58 -08:00
Micah Lee
32c0c033d1
Fix tests to use data_dir setting instead of downloads_dir
2019-01-20 12:01:51 -08:00
Micah Lee
ecc9ef705a
Make it so GUI tests only run with --rungui
2019-01-15 21:52:42 -08:00
Micah Lee
f316b6ef3b
Merge branch 'develop' into 406_osx_sandbox
2018-12-16 17:11:18 -08:00
Micah Lee
a26c457b3c
Merge pull request #831 from micahflee/812_fix_v3_onions
...
[WIP] Fix v3 onion services
2018-12-16 17:01:40 -08:00