# Path: papaye/tests/tools.py
# class FakeGRequestResponse():
# 
#     def __init__(self, status_code, content, url="https://fake/url/"):
#         self.status_code = status_code
#         self.content = content
#         self.url = url


import mock
import unittest
from requests import ConnectionError
from papaye.tests.tools import FakeGRequestResponse
    from papaye.views.mixins import ExistsOnPyPIMixin




class ExistsOnPyPIMixinTest(unittest.TestCase):


    class FakeView(ExistsOnPyPIMixin, object):
        pass

    @mock.patch('requests.get')
    def test_exists_on_pypi(self, mock):

# Path: papaye/tests/tools.py
# class FakeGRequestResponse():
# 
#     def __init__(self, status_code, content, url="https://fake/url/"):
#         self.status_code = status_code
#         self.content = content
#         self.url = url


# Path: papaye/tests/test_views_mixins.py
import mock
import unittest
from requests import ConnectionError
from papaye.tests.tools import FakeGRequestResponse
    from papaye.views.mixins import ExistsOnPyPIMixin





class ExistsOnPyPIMixinTest(unittest.TestCase):


    class FakeView(ExistsOnPyPIMixin, object):
        pass

    @mock.patch('requests.get')
    def test_exists_on_pypi(self, mock):

        mock.return_value = FakeGRequestResponse(200, '')