Esempio n. 1
0
def test_map_search_criteria(criteria, mapping, result):
    app = Flask('test')
    Multipass(app)
    with app.app_context():
        settings = {'mapping': mapping}
        provider = IdentityProvider(None, 'foo', settings)
        assert provider.map_search_criteria(criteria) == result
Esempio n. 2
0
def test_settings_copied():
    app = Flask('test')
    Multipass(app)
    with app.app_context():
        settings = {'foo': 'bar'}
        provider = IdentityProvider(None, None, settings)
        provider.settings['foo'] = 'foobar'
        assert settings['foo'] == 'bar'
Esempio n. 3
0
def test_settings_title(settings, title):
    app = Flask('test')
    Multipass(app)
    with app.app_context():
        provider = IdentityProvider(None, 'foo', settings)
        assert provider.title == title