From 45cb0a298ccc3318e09206ff0a4aaee21fe7495b Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 1 Nov 2023 11:02:28 +1300 Subject: [PATCH] Increase coverage --- tests/hdx/location/test_adminlevel.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/hdx/location/test_adminlevel.py b/tests/hdx/location/test_adminlevel.py index 1a0688f..828449a 100755 --- a/tests/hdx/location/test_adminlevel.py +++ b/tests/hdx/location/test_adminlevel.py @@ -314,6 +314,13 @@ def test_adminlevel_pcode_formats(self, config, url, formats_url): admintwo = AdminLevel(config, admin_level=2) admintwo.setup_from_url(admin_url=url) + assert admintwo.get_pcode( + "YEM", "YE03001", logname="test", fuzzy_match=False + ) == ( + None, + True, + ) + admintwo.load_pcode_formats(formats_url=formats_url) assert admintwo.get_pcode("YEM", "YE3001", logname="test") == ( "YE3001", @@ -440,13 +447,11 @@ def test_adminlevel_pcode_formats(self, config, url, formats_url): ) admintwo.set_parent_admins([adminone.pcodes]) - assert admintwo.get_pcode("NER", "NE00409", logname="test") == ( - "NER004009", + assert admintwo.get_pcode("YEM", "YEM03001", logname="test") == ( + "YE3001", True, ) - assert admintwo.get_pcode( - "COL", "CO080849", logname="test", fuzzy_match=False - ) == ( - "CO08849", + assert admintwo.get_pcode("NGA", "NG1501", logname="test") == ( + "NG015001", True, )