# Path: ntfy/backends/pushbullet.py
# def notify(title,
#            message,
#            access_token,
#            device_iden=None,
#            email=None,
#            retcode=None):
#     """
#     Required parameter:
#         * ``access_token`` - Your Pushbullet access token, created at
#             https://www.pushbullet.com/#settings/account
# 
#     Optional parameters:
#         * ``device_iden`` - a device identifier, if omited, notification is
#                             sent to all devices
#         * ``email`` - send notification to pushbullte user with the specified
#                       email or send an email if they aren't a pushullet user
#     """
# 
#     data = {
#         'type': 'note',
#         'title': title,
#         'body': message,
#     }
#     if device_iden is not None:
#         data['device_iden'] = device_iden
#     if email is not None:
#         data['email'] = email
# 
#     headers = {'Access-Token': access_token, 'User-Agent': USER_AGENT}
# 
#     resp = requests.post(
#         'https://api.pushbullet.com/v2/pushes', data=data, headers=headers)
# 
#     resp.raise_for_status()
# 
# Path: ntfy/config.py
# USER_AGENT = 'ntfy/{version} {default_user_agent}'.format(
#     version=__version__,
#     default_user_agent=requests.utils.default_user_agent())


from unittest import TestCase, main
from mock import patch
from ntfy.backends.pushbullet import notify
from ntfy.config import USER_AGENT



class TestPushbullet(TestCase):
    @patch('requests.post')
    def test_basic(self, mock_post):

# Path: ntfy/backends/pushbullet.py
# def notify(title,
#            message,
#            access_token,
#            device_iden=None,
#            email=None,
#            retcode=None):
#     """
#     Required parameter:
#         * ``access_token`` - Your Pushbullet access token, created at
#             https://www.pushbullet.com/#settings/account
# 
#     Optional parameters:
#         * ``device_iden`` - a device identifier, if omited, notification is
#                             sent to all devices
#         * ``email`` - send notification to pushbullte user with the specified
#                       email or send an email if they aren't a pushullet user
#     """
# 
#     data = {
#         'type': 'note',
#         'title': title,
#         'body': message,
#     }
#     if device_iden is not None:
#         data['device_iden'] = device_iden
#     if email is not None:
#         data['email'] = email
# 
#     headers = {'Access-Token': access_token, 'User-Agent': USER_AGENT}
# 
#     resp = requests.post(
#         'https://api.pushbullet.com/v2/pushes', data=data, headers=headers)
# 
#     resp.raise_for_status()
# 
# Path: ntfy/config.py
# USER_AGENT = 'ntfy/{version} {default_user_agent}'.format(
#     version=__version__,
#     default_user_agent=requests.utils.default_user_agent())


# Path: tests/test_pushbullet.py
from unittest import TestCase, main
from mock import patch
from ntfy.backends.pushbullet import notify
from ntfy.config import USER_AGENT




class TestPushbullet(TestCase):
    @patch('requests.post')
    def test_basic(self, mock_post):

        notify('title', 'message', access_token='access_token')