コード例 #1
0
ファイル: test_pushalot.py プロジェクト: vyraun/ntfy
 def test_basic(self, mock_post):
     notify('title', 'message', auth_token='access_token')
     mock_post.assert_called_once_with(self.URL,
                                       data={
                                           'Body': 'message',
                                           'Title': 'title',
                                           'AuthorizationToken':
                                           'access_token'
                                       },
                                       headers={'User-Agent': USER_AGENT})
コード例 #2
0
ファイル: test_pushalot.py プロジェクト: vyraun/ntfy
 def test_url_title(self, mock_post):
     notify('title',
            'message',
            url='example.com',
            url_title='url title',
            auth_token='access_token')
     mock_post.assert_called_once_with(self.URL,
                                       data={
                                           'Body': 'message',
                                           'Title': 'title',
                                           'Link': 'example.com',
                                           'LinkTitle': 'url title',
                                           'AuthorizationToken':
                                           'access_token'
                                       },
                                       headers={'User-Agent': USER_AGENT})