tests: add check for refused http access for sites using pickle (#67190)

This commit is contained in:
Frédéric Péters 2022-07-11 09:44:42 +02:00
parent 1eda23197b
commit 1fd2ab76a1
1 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,12 @@ def pub():
clean_temporary_pub()
@pytest.fixture
def pickle_pub():
yield create_temporary_pub(sql_mode=False)
clean_temporary_pub()
@pytest.fixture
def user1(pub):
user1 = pub.user_class(name='user-one-role')
@ -180,3 +186,8 @@ def test_jquery_debug_mode(pub, formdef1):
def test_i18n_js(pub):
get_app(pub).get('/i18n.js')
def test_pickle_site(pickle_pub):
resp = get_app(pickle_pub).get('/', status=503)
assert resp.text == 'Missing database configuration'