From 2e9065b5bd46fc7898d1f5935382f7b16c2c2eee Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Tue, 2 Jul 2024 16:48:51 -0400 Subject: [PATCH] testing without secure setting --- apprise/plugins/wxpusher.py | 6 +++--- test/test_plugin_wxpusher.py | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/apprise/plugins/wxpusher.py b/apprise/plugins/wxpusher.py index a4b16f8daf..e4c89d08fa 100644 --- a/apprise/plugins/wxpusher.py +++ b/apprise/plugins/wxpusher.py @@ -83,13 +83,13 @@ class NotifyWxPusher(NotifyBase): service_url = 'https://wxpusher.zjiecode.com/' # The default protocol - secure_protocol = 'wxpusher' + protocol = 'wxpusher' # A URL that takes you to the setup/help of the specific protocol setup_url = 'https://github.com/caronc/apprise/wiki/Notify_wxpusher' # WxPusher notification endpoint - notify_url = 'https://wxpusher.zjiecode.com/api/send/message' + notify_url = 'http://wxpusher.zjiecode.com/api/send/message' # Define object templates templates = ( @@ -292,7 +292,7 @@ def url(self, privacy=False, *args, **kwargs): params = self.url_parameters(privacy=privacy, *args, **kwargs) return '{schema}://{token}/{targets}/?{params}'.format( - schema=self.secure_protocol, + schema=self.protocol, token=self.pprint( self.token, privacy, mode=PrivacyMode.Secret, safe=''), targets='/'.join(chain( diff --git a/test/test_plugin_wxpusher.py b/test/test_plugin_wxpusher.py index ea3ffcb9cc..90e718e8d0 100644 --- a/test/test_plugin_wxpusher.py +++ b/test/test_plugin_wxpusher.py @@ -235,7 +235,7 @@ def test_plugin_wxpusher_edge_cases(mock_post): assert mock_post.call_count == 1 details = mock_post.call_args_list[0] - assert details[0][0] == 'https://wxpusher.zjiecode.com/api/send/message' + assert details[0][0] == 'http://wxpusher.zjiecode.com/api/send/message' payload = loads(details[1]['data']) assert payload == { 'appToken': 'AT_appid', @@ -245,7 +245,6 @@ def test_plugin_wxpusher_edge_cases(mock_post): 'topicIds': [], 'uids': ['UID_abcd'], 'verifyPay': False, - 'verifyPayType': 0, 'url': None, } @@ -282,7 +281,7 @@ def test_plugin_wxpusher_result_set(mock_post): assert mock_post.call_count == 1 details = mock_post.call_args_list[0] - assert details[0][0] == 'https://wxpusher.zjiecode.com/api/send/message' + assert details[0][0] == 'http://wxpusher.zjiecode.com/api/send/message' payload = loads(details[1]['data']) assert payload == { 'appToken': 'AT_appid', @@ -292,7 +291,6 @@ def test_plugin_wxpusher_result_set(mock_post): 'topicIds': [123], 'uids': ['UID_456'], 'verifyPay': False, - 'verifyPayType': 0, 'url': None, } @@ -313,7 +311,7 @@ def test_plugin_wxpusher_result_set(mock_post): assert mock_post.call_count == 1 details = mock_post.call_args_list[0] - assert details[0][0] == 'https://wxpusher.zjiecode.com/api/send/message' + assert details[0][0] == 'http://wxpusher.zjiecode.com/api/send/message' payload = loads(details[1]['data']) assert payload == { @@ -324,7 +322,6 @@ def test_plugin_wxpusher_result_set(mock_post): 'topicIds': [123456789], 'uids': ['UID_123', 'UID_abc'], 'verifyPay': False, - 'verifyPayType': 0, 'url': None, }