Resolve ambiguity with apprise.plugins module namespace

While the namespace is physically made of modules, it has been amended
to be the namespace home for the corresponding notifier classes as well.

This turned out to confuse both humans and machines on various ends.

While it has apparently worked for a while, it croaks on Python 3.11
now, and is not considered to have been a good idea in general.
This commit is contained in:
Andreas Motl
2022-10-09 11:28:18 +02:00
parent c797d1e2eb
commit c9f0751b61
88 changed files with 1721 additions and 1688 deletions

View File

@ -23,7 +23,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import requests
from apprise import plugins
from apprise.plugins.NotifyGoogleChat import NotifyGoogleChat
from helpers import AppriseURLTester
# Disable logging for a cleaner testing output
@ -48,34 +49,34 @@ apprise_url_tests = (
}),
# Credentials are good
('gchat://workspace/key/token', {
'instance': plugins.NotifyGoogleChat,
'instance': NotifyGoogleChat,
'privacy_url': 'gchat://w...e/k...y/t...n',
}),
# Test arguments
('gchat://?workspace=ws&key=mykey&token=mytoken', {
'instance': plugins.NotifyGoogleChat,
'instance': NotifyGoogleChat,
'privacy_url': 'gchat://w...s/m...y/m...n',
}),
# Google Native Webhohok URL
('https://chat.googleapis.com/v1/spaces/myworkspace/messages'
'?key=mykey&token=mytoken', {
'instance': plugins.NotifyGoogleChat,
'instance': NotifyGoogleChat,
'privacy_url': 'gchat://m...e/m...y/m...n'}),
('gchat://workspace/key/token', {
'instance': plugins.NotifyGoogleChat,
'instance': NotifyGoogleChat,
# force a failure
'response': False,
'requests_response_code': requests.codes.internal_server_error,
}),
('gchat://workspace/key/token', {
'instance': plugins.NotifyGoogleChat,
'instance': NotifyGoogleChat,
# throw a bizzare code forcing us to fail to look it up
'response': False,
'requests_response_code': 999,
}),
('gchat://workspace/key/token', {
'instance': plugins.NotifyGoogleChat,
'instance': NotifyGoogleChat,
# Throws a series of connection and transfer exceptions when this flag
# is set and tests that we gracfully handle them
'test_requests_exceptions': True,