From dc63c8479e450526ff9875d94ba538743c15dbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Mon, 29 Jan 2024 09:55:59 +0100 Subject: [PATCH] Fix unit test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- tests/unit/security/test_ipa.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/security/test_ipa.py b/tests/unit/security/test_ipa.py index 6f953248..04ce4a5d 100644 --- a/tests/unit/security/test_ipa.py +++ b/tests/unit/security/test_ipa.py @@ -25,6 +25,9 @@ def ipa_call_error(): def test_choose_server(client, mocker): + mocker.patch.dict( + current_app.config, {"FREEIPA_SERVERS": ["a.example.test", "b.example.com"]} + ) random = mocker.patch("noggin.security.ipa.random") random.choice.side_effect = ["a.example.test", "b.example.test", "c.example.test"] with client.session_transaction() as sess: