Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(6)  |  Derive(0)  |  Import(5)

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/tests/test_views.py   captain(Download)
 
from django_browserid import BrowserIDException, views
from django_browserid.tests import mock_browserid, patch_settings
 
 
        patches['LOGIN_REDIRECT_URL_FAILURE'] = failure_url
 
    with patch_settings(**patches):
        verify_view = views.Verify.as_view()
        with patch.object(auth, 'login'):
 
    # Test if allowed properly.
    with patch_settings(CSP_DEFAULT_SRC=[],
                        CSP_SCRIPT_SRC=['https://login.persona.org'],
                        CSP_FRAME_SRC=['https://login.persona.org']):
 
    # Test fallback to default-src.
    with patch_settings(CSP_DEFAULT_SRC=['https://login.persona.org'],
                        CSP_SCRIPT_SRC=[],
                        CSP_FRAME_SRC=[]):
 
    # Test incorrect csp.
    with patch_settings(CSP_DEFAULT_SRC=[],
                        CSP_SCRIPT_SRC=[],
                        CSP_FRAME_SRC=[]):

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/tests/test_urls.py   captain(Download)
from mock import Mock
 
from django_browserid.tests import patch_settings
from django_browserid import urls
 
    def test_override_verify_class(self):
        # Reload so that the settings.BROWSERID_VERIFY_CLASS takes effect.
        path = 'django_browserid.tests.test_urls.MyVerifyClass'
        with patch_settings(BROWSERID_VERIFY_CLASS=path):
            reload(urls)

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/tests/test_util.py   captain(Download)
from django.utils.functional import lazy
 
from django_browserid.tests import patch_settings
from django_browserid.util import import_function_from_setting, LazyEncoder
 

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/tests/test_helpers.py   captain(Download)
                                      browserid_js, browserid_login,
                                      browserid_css, browserid_logout)
from django_browserid.tests import mock_browserid, patch_settings
 
 

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/tests/test_base.py   captain(Download)
 
from django_browserid.base import BrowserIDException, get_audience, verify
from django_browserid.tests import patch_settings