Skip to content

Commit c7ddb43

Browse files
committed
SDK-1197: Add tests for age verifications when no verifications exist
1 parent 602bfba commit c7ddb43

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

yoti_python_sdk/tests/test_profile.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,3 +725,31 @@ def test_get_age_verifications():
725725
age_verifications = human_profile.get_age_verifications()
726726

727727
assert len(age_verifications) == 1
728+
729+
730+
def test_expect_none_when_no_age_over_verification_exists():
731+
attribute_list = create_single_attribute_list(
732+
name=config.ATTRIBUTE_GIVEN_NAMES,
733+
value="Jenny",
734+
anchors=None,
735+
content_type=Protobuf.CT_STRING,
736+
)
737+
738+
human_profile = Profile(attribute_list)
739+
740+
age_over_verification = human_profile.find_age_over_verification(18)
741+
assert age_over_verification is None
742+
743+
744+
def test_expect_none_when_no_age_under_verification_exists():
745+
attribute_list = create_single_attribute_list(
746+
name=config.ATTRIBUTE_GIVEN_NAMES,
747+
value="Jenny",
748+
anchors=None,
749+
content_type=Protobuf.CT_STRING,
750+
)
751+
752+
human_profile = Profile(attribute_list)
753+
754+
age_under_verification = human_profile.find_age_under_verification(18)
755+
assert age_under_verification is None

0 commit comments

Comments
 (0)