Notica Support Added; fixes #165 (#166)

This commit is contained in:
Chris Caron
2019-10-19 09:28:31 -04:00
committed by GitHub
parent 2a31d393b7
commit acc461d598
5 changed files with 271 additions and 6 deletions

View File

@ -1401,6 +1401,53 @@ TEST_URLS = (
'test_requests_exceptions': True,
}),
##################################
# NotifyNotica
##################################
('notica://', {
'instance': TypeError,
}),
('notica://:@/', {
'instance': TypeError,
}),
# Native URL
('https://notica.us/?%s' % ('z' * 6), {
'instance': plugins.NotifyNotica,
# Our expected url(privacy=True) startswith() response:
'privacy_url': 'notica://z...z',
}),
# Token specified
('notica://%s' % ('a' * 6), {
'instance': plugins.NotifyNotica,
# Our expected url(privacy=True) startswith() response:
'privacy_url': 'notica://a...a',
}),
('notica://%s' % ('b' * 6), {
'instance': plugins.NotifyNotica,
# don't include an image by default
'include_image': False,
}),
('notica://%s' % ('c' * 6), {
'instance': plugins.NotifyNotica,
# force a failure
'response': False,
'requests_response_code': requests.codes.internal_server_error,
}),
('notica://%s' % ('d' * 7), {
'instance': plugins.NotifyNotica,
# throw a bizzare code forcing us to fail to look it up
'response': False,
'requests_response_code': 999,
}),
('notica://%s' % ('e' * 8), {
'instance': plugins.NotifyNotica,
# Throws a series of connection and transfer exceptions when this flag
# is set and tests that we gracfully handle them
'test_requests_exceptions': True,
}),
##################################
# NotifyNotifico
##################################