Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
python-social-auth / tests / backends / test_broken.py
Size: Mime:
import unittest2 as unittest

from social.backends.base import BaseAuth


class BrokenBackendAuth(BaseAuth):
    name = 'broken'


class BrokenBackendTest(unittest.TestCase):
    def setUp(self):
        self.backend = BrokenBackendAuth()

    def tearDown(self):
        self.backend = None

    def test_auth_url(self):
        with self.assertRaisesRegexp(NotImplementedError,
                                     'Implement in subclass'):
            self.backend.auth_url()

    def test_auth_html(self):
        with self.assertRaisesRegexp(NotImplementedError,
                                     'Implement in subclass'):
            self.backend.auth_html()

    def test_auth_complete(self):
        with self.assertRaisesRegexp(NotImplementedError,
                                     'Implement in subclass'):
            self.backend.auth_complete()

    def test_get_user_details(self):
        with self.assertRaisesRegexp(NotImplementedError,
                                     'Implement in subclass'):
            self.backend.get_user_details(None)