mirror of
https://github.com/caronc/apprise.git
synced 2025-08-09 00:15:03 +02:00
Nextcloud Support (#186)
This commit is contained in:
@ -1737,6 +1737,72 @@ TEST_URLS = (
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifyNextcloud
|
||||
##################################
|
||||
('ncloud://:@/', {
|
||||
'instance': None,
|
||||
}),
|
||||
('ncloud://', {
|
||||
'instance': None,
|
||||
}),
|
||||
('nclouds://', {
|
||||
# No hostname
|
||||
'instance': None,
|
||||
}),
|
||||
('ncloud://localhost', {
|
||||
# No user specified
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('ncloud://localhost/admin', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
}),
|
||||
('ncloud://user@localhost/admin', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
}),
|
||||
('ncloud://user@localhost?to=user1,user2', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
}),
|
||||
('ncloud://user:pass@localhost/user1/user2', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
|
||||
# Our expected url(privacy=True) startswith() response:
|
||||
'privacy_url': 'ncloud://user:****@localhost/user1/user2',
|
||||
}),
|
||||
('ncloud://user:pass@localhost:8080/admin', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
}),
|
||||
('nclouds://user:pass@localhost/admin', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
|
||||
# Our expected url(privacy=True) startswith() response:
|
||||
'privacy_url': 'nclouds://user:****@localhost/admin',
|
||||
}),
|
||||
('nclouds://user:pass@localhost:8080/admin/', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
}),
|
||||
('ncloud://localhost:8080/admin?-HeaderKey=HeaderValue', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
}),
|
||||
('ncloud://user:pass@localhost:8081/admin', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
# force a failure
|
||||
'response': False,
|
||||
'requests_response_code': requests.codes.internal_server_error,
|
||||
}),
|
||||
('ncloud://user:pass@localhost:8082/admin', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
# throw a bizzare code forcing us to fail to look it up
|
||||
'response': False,
|
||||
'requests_response_code': 999,
|
||||
}),
|
||||
('ncloud://user:pass@localhost:8083/user1/user2/user3', {
|
||||
'instance': plugins.NotifyNextcloud,
|
||||
# Throws a series of connection and transfer exceptions when this flag
|
||||
# is set and tests that we gracfully handle them
|
||||
'test_requests_exceptions': True,
|
||||
}),
|
||||
|
||||
##################################
|
||||
# NotifyProwl
|
||||
##################################
|
||||
|
Reference in New Issue
Block a user