From e3b07d95f252a3dd54ea98b4fd5168b2e79d1be3 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 2 Jul 2021 21:10:20 +0200 Subject: tests: fix expected get_by_tabname input type --- test/test_config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/test_config.py b/test/test_config.py index e562f425..8e92bf3f 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -9,6 +9,7 @@ from pathlib import Path import pytest from poezio import config +from slixmpp import JID @pytest.fixture(scope="module") @@ -104,10 +105,10 @@ class TestTabNames(object): config_obj.set_and_save('test2', value='value2@toto.com', section='@toto.com') - assert config_obj.get_by_tabname('test', 'toto@toto.com') == 'value.toto@toto.com' - assert config_obj.get_by_tabname('test2', 'toto@toto.com') == 'value2@toto.com' - assert config_obj.get_by_tabname('test2', 'toto@toto.com', fallback=False) == 'value2@toto.com' - assert config_obj.get_by_tabname('test2', 'toto@toto.com', fallback_server=False) == 'true' - assert config_obj.get_by_tabname('test_int', 'toto@toto.com', fallback=False) == '' + assert config_obj.get_by_tabname('test', JID('toto@toto.com')) == 'value.toto@toto.com' + assert config_obj.get_by_tabname('test2', JID('toto@toto.com')) == 'value2@toto.com' + assert config_obj.get_by_tabname('test2', JID('toto@toto.com'), fallback=False) == 'value2@toto.com' + assert config_obj.get_by_tabname('test2', JID('toto@toto.com'), fallback_server=False) == 'true' + assert config_obj.get_by_tabname('test_int', JID('toto@toto.com'), fallback=False) == '' -- cgit v1.2.3