Пример #1
0
def test_overview_with_mod(moderator_user, application, default_settings):
    with application.test_request_context():
        login_user(moderator_user)
        resp = views.overview()
        assert "Overview" in resp
Пример #2
0
def test_overview_not_authorized(application, default_settings):
    with application.test_request_context(), pytest.raises(AuthorizationRequired) as excinfo:
        views.overview()

    assert "Authorization is required to access this area." == excinfo.value.description
Пример #3
0
def test_overview_with_authorized(admin_user, application, default_settings):
    with application.test_request_context():
        login_user(admin_user)
        resp = views.overview()
        assert "Overview" in resp
Пример #4
0
def test_overview_not_authorized(application, default_settings):
    with application.test_request_context(), pytest.raises(
            AuthorizationRequired) as excinfo:
        views.overview()

    assert "Authorization is required to access this area." == excinfo.value.description
Пример #5
0
def test_overview_with_mod(moderator_user, application, default_settings):
    with application.test_request_context():
        login_user(moderator_user)
        resp = views.overview()
        assert 'Overview' in resp
Пример #6
0
def test_overview_with_authorized(admin_user, application, default_settings):
    with application.test_request_context():
        login_user(admin_user)
        resp = views.overview()
        assert 'Overview' in resp
Пример #7
0
def test_overview_with_supermod(super_moderator_user, application, default_settings):  # noqa
    with application.test_request_context():
        login_user(super_moderator_user)
        resp = views.overview()
        assert 'Overview' in resp