forked from Github-Mirrors/canaille
tests: put 'TESTING=True' in the common conf
This commit is contained in:
parent
e89c10934a
commit
57bb0e01bc
3 changed files with 1 additions and 5 deletions
|
@ -161,8 +161,6 @@ def test_smtp_bad_tls(testclient, backend, smtpd, configuration):
|
|||
|
||||
@pytest.fixture
|
||||
def themed_testclient(app, configuration, backend):
|
||||
configuration["TESTING"] = True
|
||||
|
||||
root = os.path.dirname(os.path.abspath(__file__))
|
||||
test_theme_path = os.path.join(root, "fixtures", "themes", "test")
|
||||
configuration["CANAILLE"]["THEME"] = test_theme_path
|
||||
|
|
|
@ -31,7 +31,6 @@ format=[%(asctime)s] %(levelname)s in %(module)s: %(message)s
|
|||
|
||||
|
||||
def test_file_log_config(configuration, backend, tmp_path, smtpd, admin):
|
||||
configuration["TESTING"] = True
|
||||
assert len(smtpd.messages) == 0
|
||||
log_path = os.path.join(tmp_path, "canaille-by-file.log")
|
||||
|
||||
|
@ -63,7 +62,6 @@ def test_file_log_config(configuration, backend, tmp_path, smtpd, admin):
|
|||
|
||||
|
||||
def test_dict_log_config(configuration, backend, tmp_path, smtpd, admin):
|
||||
configuration["TESTING"] = True
|
||||
assert len(smtpd.messages) == 0
|
||||
log_path = os.path.join(tmp_path, "canaille-by-dict.log")
|
||||
configuration["CANAILLE"]["LOGGING"] = {
|
||||
|
|
|
@ -68,6 +68,7 @@ def configuration(smtpd):
|
|||
"SECRET_KEY": gen_salt(24),
|
||||
"SERVER_NAME": "canaille.test",
|
||||
"PREFERRED_URL_SCHEME": "http",
|
||||
"TESTING": True,
|
||||
"CANAILLE": {
|
||||
"JAVASCRIPT": False,
|
||||
"LOGO": "/static/img/canaille-head.webp",
|
||||
|
@ -174,7 +175,6 @@ def app(configuration, backend, jinja_cache_directory):
|
|||
|
||||
@pytest.fixture
|
||||
def testclient(app):
|
||||
app.config["TESTING"] = True
|
||||
app.jinja_env.undefined = StrictUndefined
|
||||
yield TestApp(app)
|
||||
|
||||
|
|
Loading…
Reference in a new issue