Gotify supports extended URL paths beyond just the hostname (#259)

This commit is contained in:
Chris Caron
2020-07-27 11:10:54 -04:00
committed by GitHub
parent 74759031fc
commit 84feb163aa
3 changed files with 49 additions and 4 deletions

View File

@ -803,6 +803,20 @@ TEST_URLS = (
# Our expected url(privacy=True) startswith() response:
'privacy_url': 'gotify://hostname/t...t',
}),
# Provide a hostname, path, and token
('gotify://hostname/a/path/ending/in/a/slash/%s' % ('u' * 16), {
'instance': plugins.NotifyGotify,
# Our expected url(privacy=True) startswith() response:
'privacy_url': 'gotify://hostname/a/path/ending/in/a/slash/u...u/',
}),
# Provide a hostname, path, and token
('gotify://hostname/a/path/not/ending/in/a/slash/%s' % ('v' * 16), {
'instance': plugins.NotifyGotify,
# Our expected url(privacy=True) startswith() response:
'privacy_url': 'gotify://hostname/a/path/not/ending/in/a/slash/v...v/',
}),
# Provide a priority
('gotify://hostname/%s?priority=high' % ('i' * 16), {
'instance': plugins.NotifyGotify,