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

Reuse Configurations With Asterisk App IDs and Token Based APNS Auth #108

Merged
merged 9 commits into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions sygnal/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ async def cb():
root_span.finish()

def find_pushkins(self, appid):
"""
Finds matching pushkins in self.sygnal.pushkins according to the appid.
If it finds a specific pushkin with the exact app id, immediately returns
it (as a list).
Otherwise returns possible pushkins (as a list).
"""Finds matching pushkins in self.sygnal.pushkins according to the appid.

appid: app identifier to search in self.sygnal.pushkins.
Args:
appid (str): app identifier to search in self.sygnal.pushkins.
Returns:
ismailgulek marked this conversation as resolved.
Show resolved Hide resolved
list of `Pushkin`: If it finds a specific pushkin with
the exact app id, immediately returns it.
Otherwise returns possible pushkins.
"""

# if found a specific appid, just return it as a list
if appid in self.sygnal.pushkins:
return [self.sygnal.pushkins[appid]]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

class HttpTestCase(testutils.TestCase):
def setUp(self):
self.apns_mock_class = patch("sygnal.apnspushkin.APNs").start()
self.apns_mock_class = patch("aioapns.APNs").start()
self.apns_mock = MagicMock()
self.apns_mock_class.return_value = self.apns_mock

Expand Down