Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of stride:// as service is going down on 2019.02.15; refs #56 #64

Merged
merged 2 commits into from
Feb 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 0 additions & 253 deletions apprise/plugins/NotifyStride.py

This file was deleted.

3 changes: 1 addition & 2 deletions apprise/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
from .NotifyPushover import NotifyPushover
from .NotifyRocketChat import NotifyRocketChat
from .NotifySlack import NotifySlack
from .NotifyStride import NotifyStride
from .NotifyTelegram import NotifyTelegram
from .NotifyTwitter.NotifyTwitter import NotifyTwitter
from .NotifyXBMC import NotifyXBMC
Expand All @@ -68,7 +67,7 @@
'NotifyFaast', 'NotifyGnome', 'NotifyGrowl', 'NotifyIFTTT', 'NotifyJoin',
'NotifyJSON', 'NotifyMatrix', 'NotifyMatterMost', 'NotifyProwl',
'NotifyPushed', 'NotifyPushBullet', 'NotifyPushjet',
'NotifyPushover', 'NotifyRocketChat', 'NotifySlack', 'NotifyStride',
'NotifyPushover', 'NotifyRocketChat', 'NotifySlack',
'NotifyTwitter', 'NotifyTelegram', 'NotifyXBMC',
'NotifyXML', 'NotifyWindows',

Expand Down
92 changes: 0 additions & 92 deletions test/test_rest_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from apprise.common import NotifyFormat

from json import dumps
import uuid
import requests
import mock

Expand Down Expand Up @@ -252,63 +251,6 @@
'test_requests_exceptions': True,
}),

##################################
# NotifyStride
##################################
# no auth_key specified
('stride://', {
'instance': None,
}),
# No token_a specified
('stride://auth_key', {
# Missing a token
'instance': TypeError,
}),
# No token_b specified
('stride://auth_key/{0}'.format(
str(uuid.uuid4())), {
'instance': TypeError,
}),
# invalid uuid entries
('stride://auth_key/{0}/{1}'.format(
'invalid-uuid', str(uuid.uuid4())), {
'instance': TypeError,
}),
('stride://auth_key/{0}/{1}'.format(
str(uuid.uuid4()), 'invalid-uuid'), {
'instance': TypeError,
}),
# A valid url
('stride://auth_key/{0}/{1}'.format(
str(uuid.uuid4()), str(uuid.uuid4())), {
'instance': plugins.NotifyStride,
}),
# A very invalid URL
('stride://:@/', {
'instance': None,
}),
('stride://auth_key/{0}/{1}'.format(
str(uuid.uuid4()), str(uuid.uuid4())), {
'instance': plugins.NotifyStride,
# force a failure
'response': False,
'requests_response_code': requests.codes.internal_server_error,
}),
('stride://auth_key/{0}/{1}'.format(
str(uuid.uuid4()), str(uuid.uuid4())), {
'instance': plugins.NotifyStride,
# throw a bizzare code forcing us to fail to look it up
'response': False,
'requests_response_code': 999,
}),
('stride://auth_key/{0}/{1}'.format(
str(uuid.uuid4()), str(uuid.uuid4())), {
'instance': plugins.NotifyStride,
# Throws a series of connection and transfer exceptions when this flag
# is set and tests that we gracfully handle them
'test_requests_exceptions': True,
}),

##################################
# NotifyIFTTT - If This Than That
##################################
Expand Down Expand Up @@ -2166,40 +2108,6 @@ def test_notify_ifttt_plugin(mock_post, mock_get):
notify_type=NotifyType.INFO) is True


def test_notify_stride_plugin():
"""
API: NotifyStride() Extra Checks

"""
try:
# Initializes the plugin with devices set to a string
plugins.NotifyStride(
auth_token=None,
cloud_id=str(uuid.uuid4()),
convo_id=str(uuid.uuid4()),
)
# The code shouldn't make it here, we should throw an exception
# on the previous line
assert False

except TypeError:
assert True

try:
# Initializes the plugin with devices set to a string
plugins.NotifyStride(
auth_token='key',
cloud_id=str(uuid.uuid4()),
convo_id=None,
)
# The code shouldn't make it here, we should throw an exception
# on the previous line
assert False

except TypeError:
assert True


@mock.patch('requests.get')
@mock.patch('requests.post')
def test_notify_join_plugin(mock_post, mock_get):
Expand Down