示例#1
0
 def test_email(self, mock_post):
     notify('title', 'message', access_token='access_token',
            email='*****@*****.**')
     mock_post.assert_called_once_with(
         'https://api.pushbullet.com/v2/pushes',
         data={'body': 'message', 'title': 'title',
               'email': '*****@*****.**', 'type': 'note'},
         headers={'Access-Token': 'access_token'})
示例#2
0
 def test_device(self, mock_post):
     notify('title', 'message', access_token='access_token',
            device_iden='foobar')
     mock_post.assert_called_once_with(
         'https://api.pushbullet.com/v2/pushes',
         data={'body': 'message', 'title': 'title',
               'device_iden': 'foobar', 'type': 'note'},
         headers={'Access-Token': 'access_token'})
 def test_basic(self, mock_post):
     notify('title', 'message', access_token='access_token')
     mock_post.assert_called_once_with(
         'https://api.pushbullet.com/v2/pushes',
         data={'body': 'message',
               'title': 'title',
               'type': 'note'},
         headers={'Access-Token': 'access_token',
                  'User-Agent': USER_AGENT})
示例#4
0
 def test_basic(self, mock_post):
     notify('title', 'message', access_token='access_token')
     mock_post.assert_called_once_with(
         'https://api.pushbullet.com/v2/pushes',
         data={'body': 'message',
               'title': 'title',
               'type': 'note'},
         headers={'Access-Token': 'access_token',
                  'User-Agent': USER_AGENT})
示例#5
0
 def test_email(self, mock_post):
     notify('title',
            'message',
            access_token='access_token',
            email='*****@*****.**')
     mock_post.assert_called_once_with(
         'https://api.pushbullet.com/v2/pushes',
         data={
             'body': 'message',
             'title': 'title',
             'email': '*****@*****.**',
             'type': 'note'
         },
         headers={'Access-Token': 'access_token'})
示例#6
0
 def test_device(self, mock_post):
     notify('title',
            'message',
            access_token='access_token',
            device_iden='foobar')
     mock_post.assert_called_once_with(
         'https://api.pushbullet.com/v2/pushes',
         data={
             'body': 'message',
             'title': 'title',
             'device_iden': 'foobar',
             'type': 'note'
         },
         headers={'Access-Token': 'access_token'})