From 767b67f4403ce443125c9132d836660fb609f9fb Mon Sep 17 00:00:00 2001 From: Maximilien Cuony Date: Wed, 3 May 2023 10:49:48 +0200 Subject: [PATCH] tgt_type vs expr_form: fix tests --- tests/integration/test_local.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_local.py b/tests/integration/test_local.py index 1db97c1..b9d8c25 100644 --- a/tests/integration/test_local.py +++ b/tests/integration/test_local.py @@ -1,15 +1,21 @@ # -*- coding: utf-8 -*- +import warnings def test_local(pepper_client, session_minion_id): assert pepper_client.local('*', 'test.ping')['return'][0][session_minion_id] is True def test_local_with_tgt_type(pepper_client, session_minion_id): + warnings.warn(UserWarning(str(pepper_client.local('*', 'test.ping', tgt_type='list')['return']))) + warnings.warn(UserWarning(str(pepper_client.local(session_minion_id, 'test.ping', tgt_type='list')['return']))) assert pepper_client.local('*', 'test.ping', tgt_type='list')['return'][0][session_minion_id] is False assert pepper_client.local(session_minion_id, 'test.ping', tgt_type='list')['return'][0][session_minion_id] is True def test_local_with_deprecated_expr_form(pepper_client, session_minion_id): + warnings.warn(UserWarning(str(pepper_client.local('*', 'test.ping', expr_form='list')['return'][0]))) + warnings.warn(UserWarning(str(pepper_client.local(session_minion_id, 'test.ping', expr_form='list')['return']))) assert pepper_client.local('*', 'test.ping', expr_form='list')['return'][0][session_minion_id] is False - assert pepper_client.local(session_minion_id, 'test.ping', expr_form='list')['return'][0][session_minion_id] is True + r = pepper_client.local(session_minion_id, 'test.ping', expr_form='list')['return'][0][session_minion_id] + assert r is True