Projet

Général

Profil

0001-tests-only-run-test_form_autosave-against-sql-60880.patch

Frédéric Péters, 01 mars 2022 15:28

Télécharger (1,77 ko)

Voir les différences:

Subject: [PATCH] tests: only run test_form_autosave against sql (#60880)

 tests/form_pages/test_all.py | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
tests/form_pages/test_all.py
75 75
        metafunc.parametrize('pub', ['pickle', 'sql', 'pickle-lazy'], indirect=True)
76 76

  
77 77

  
78
@pytest.fixture
79
def pub(request, emails):
80
    pub = create_temporary_pub(
81
        sql_mode=bool('sql' in request.param),
82
        lazy_mode=bool('lazy' in request.param),
83
    )
78
def pub_fixture(**kwargs):
79
    pub = create_temporary_pub(**kwargs)
84 80
    pub.cfg['identification'] = {'methods': ['password']}
85 81
    pub.cfg['language'] = {'language': 'en'}
86 82
    pub.write_cfg()
......
92 88
    return pub
93 89

  
94 90

  
91
@pytest.fixture
92
def pub(request, emails):
93
    return pub_fixture(sql_mode=(request.param == 'sql'), lazy_mode=bool('lazy' in request.param))
94

  
95

  
96
@pytest.fixture
97
def sql_pub(request, emails):
98
    return pub_fixture(sql_mode=True)
99

  
100

  
95 101
@pytest.fixture
96 102
def error_email(pub):
97 103
    pub.cfg['debug'] = {'error_email': 'errors@localhost.invalid'}
......
4392 4398
    assert len(orders.keys()) > 1
4393 4399

  
4394 4400

  
4395
def test_form_autosave(pub):
4401
def test_form_autosave(sql_pub):
4402
    pub = sql_pub
4396 4403
    formdef = create_formdef()
4397 4404
    formdef.fields = [
4398 4405
        fields.PageField(id='0', label='1st page', type='page'),
4399
-