merge develop branch into client_auth_v3 branch and use our forked stem which works with poetry

This commit is contained in:
Miguel Jacq 2021-08-27 09:44:43 +10:00
commit b43e7fee13
125 changed files with 2375 additions and 1361 deletions

View file

@ -625,3 +625,21 @@ class TestShare(GuiBaseTest):
self.clientauth_is_visible(tab)
self.close_all_tabs()
def test_405_page_returned_for_invalid_methods(self):
"""
Our custom 405 page should return for invalid methods
"""
tab = self.new_share_tab()
tab.get_mode().autostop_sharing_checkbox.click()
tab.get_mode().mode_settings_widget.public_checkbox.click()
self.run_all_common_setup_tests()
self.run_all_share_mode_setup_tests(tab)
self.run_all_share_mode_started_tests(tab)
url = f"http://127.0.0.1:{tab.app.port}/"
self.hit_405(url, expected_resp="OnionShare: 405 Method Not Allowed", data = {'foo':'bar'}, methods = ["put", "post", "delete", "options"])
self.history_widgets_present(tab)
self.close_all_tabs()