Did I find the right examples for you? yes no

All Samples(18)  |  Call(11)  |  Derive(0)  |  Import(7)

src/r/e/remo-HEAD/remo/base/views.py   remo(Download)
from django import http
from django_browserid import BrowserIDException, get_audience, verify
from django_browserid.auth import default_username_algo
from django_browserid.views import Verify
from django.conf import settings

src/s/o/socorro-HEAD/webapp-django/vendor/lib/python/django_browserid/tests/test_views.py   socorro(Download)
from nose.tools import eq_, ok_
 
from django_browserid import BrowserIDException, views
from django_browserid.tests import mock_browserid, TestCase
 
        response.
        """
        excpt = BrowserIDException(Exception('hsakjw'))
        authenticate.side_effect = excpt
 
    def test_login_failure_log_exception(self):
        """If login_failure is passed an exception, it should log it."""
        excpt = BrowserIDException(Exception('hsakjw'))
 
        with patch('django_browserid.views.logger.error') as logger_error:

src/a/f/affiliates-HEAD/vendor-local/packages/django-browserid/django_browserid/tests/test_views.py   affiliates(Download)
from nose.tools import eq_, ok_
 
from django_browserid import BrowserIDException, views
from django_browserid.tests import mock_browserid, TestCase
 
        response.
        """
        excpt = BrowserIDException(Exception('hsakjw'))
        authenticate.side_effect = excpt
 
    def test_login_failure_log_exception(self):
        """If login_failure is passed an exception, it should log it."""
        excpt = BrowserIDException(Exception('hsakjw'))
 
        with patch('django_browserid.views.logger.error') as logger_error:

src/t/r/treeherder-service-HEAD/vendor/django_browserid/tests/test_views.py   treeherder-service(Download)
from nose.tools import eq_, ok_
 
from django_browserid import BrowserIDException, views
from django_browserid.auth import BrowserIDBackend
from django_browserid.tests import mock_browserid, TestCase
    def test_authenticate_browserid_exception(self, authenticate, logger_error):
        # If authenticate raises a BrowserIDException, return a failure response.
        excpt = BrowserIDException(Exception('hsakjw'))
        authenticate.side_effect = excpt
 
    def test_login_failure_log_exception(self):
        # If login_failure is passed an exception, it should log it.
        excpt = BrowserIDException(Exception('hsakjw'))
 
        with patch('django_browserid.views.logger.error') as logger_error:

src/p/l/playdoh-lib-HEAD/lib/python/django_browserid/tests/test_views.py   playdoh-lib(Download)
from nose.tools import eq_, ok_
 
from django_browserid import BrowserIDException, views
from django_browserid.tests import mock_browserid, TestCase
 
        response.
        """
        excpt = BrowserIDException(Exception('hsakjw'))
        authenticate.side_effect = excpt
 
    def test_login_failure_log_exception(self):
        """If login_failure is passed an exception, it should log it."""
        excpt = BrowserIDException(Exception('hsakjw'))
 
        with patch('django_browserid.views.logger.error') as logger_error:

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/tests/test_views.py   captain(Download)
from mock import patch
 
from django_browserid import BrowserIDException, views
from django_browserid.tests import mock_browserid, patch_settings
 
def test_authenticate_browserid_exception(authenticate):
    # If authenticate raises a BrowserIDException, redirect to the failure URL.
    err = BrowserIDException('test')
    authenticate.side_effect = err
 

src/d/j/django-browserid-0.10/django_browserid/tests/test_views.py   django-browserid(Download)
from nose.tools import eq_, ok_
 
from django_browserid import BrowserIDException, views
from django_browserid.auth import BrowserIDBackend
from django_browserid.tests import mock_browserid, TestCase
        response.
        """
        excpt = BrowserIDException(Exception('hsakjw'))
        authenticate.side_effect = excpt
 
    def test_login_failure_log_exception(self):
        """If login_failure is passed an exception, it should log it."""
        excpt = BrowserIDException(Exception('hsakjw'))
 
        with patch('django_browserid.views.logger.error') as logger_error: