From db851e1a05fb1f30d566c611471d9ae4dfa77bc6 Mon Sep 17 00:00:00 2001 From: Ivan Dimov <78815270+idimov-keeper@users.noreply.github.com> Date: Wed, 11 Sep 2024 17:59:00 -0500 Subject: [PATCH] fixing helper tests --- sdk/python/helper/requirements.txt | 2 +- .../helper/tests/v3/v3_field_type_all_fields_test.py | 4 ++-- sdk/python/helper/tests/v3/v3_field_type_test.py | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sdk/python/helper/requirements.txt b/sdk/python/helper/requirements.txt index 7cb09f23..f7f946f2 100644 --- a/sdk/python/helper/requirements.txt +++ b/sdk/python/helper/requirements.txt @@ -1,3 +1,3 @@ -keeper-secrets-manager-core>=16.2.2 +keeper-secrets-manager-core>=16.6.6 pyyaml>=6.0.1 iso8601 \ No newline at end of file diff --git a/sdk/python/helper/tests/v3/v3_field_type_all_fields_test.py b/sdk/python/helper/tests/v3/v3_field_type_all_fields_test.py index 213f9b9a..d3e790c9 100644 --- a/sdk/python/helper/tests/v3/v3_field_type_all_fields_test.py +++ b/sdk/python/helper/tests/v3/v3_field_type_all_fields_test.py @@ -124,7 +124,7 @@ def test_address(self): a.street2 = "Apt B" a.city = "Gotham" a.zip = "11111-2222" - a.country = "CA" + a.country = CountryEnum.CA self._check_dict(a, value={ "street1": "North Main Street", "street2": "Apt B", @@ -386,7 +386,7 @@ def test_passkey(self): ft.createdDate = 1625140800000 self._check_dict(ft, value={ "privateKey": { - "crv":"CRV", + "crv": "CRV", "d": "DDDDD", "ext": False, "key_ops": [], diff --git a/sdk/python/helper/tests/v3/v3_field_type_test.py b/sdk/python/helper/tests/v3/v3_field_type_test.py index 8205f9bd..70856435 100644 --- a/sdk/python/helper/tests/v3/v3_field_type_test.py +++ b/sdk/python/helper/tests/v3/v3_field_type_test.py @@ -53,8 +53,11 @@ def test_password_filter(self): def test_load_map(self): get_field_type_map() - # Nice test to make sure we loaded all the fields, if we add more fields this will fail ... but in a good way. - self.assertEqual(39, len(field_map.keys())) + # Nice test to make sure we loaded all the fields, + # if we add more fields this will fail ... but in a good way. + # All the fields include: VALID_RECORD_FIELDS and some subtypes: + # bankAccountItem, paymentCardItem, phoneItem + self.assertEqual(47, len(field_map.keys())) # Check if we get a Login class self.assertEqual(get_class_by_type("login"), Login)