@@ -57,22 +57,24 @@ def test_items_found_but_person_attribute_type_not_found_raises_error(
5757 repo .get_eligibility_data (persisted_person_with_no_person_attribute_type )
5858
5959
60- # def test_person_found_with_current_secret(person_table: Any,
61- # persisted_person: NHSNumber,
62- # hashing_service: HashingService,):
63- # # Given
64- # repo = PersonRepo(person_table, hashing_service)
65- #
66- # # When
67- # actual = repo.get_eligibility_data(persisted_person)
68- #
69- # # Then
70- # nhs_num_hash = hashing_service.hash_with_current_secret(persisted_person)
71- #
72- # assert_that(
73- # actual.data,
74- # contains_inanyorder(
75- # has_entries({"NHS_NUMBER": nhs_num_hash, "ATTRIBUTE_TYPE": "PERSON"}),
76- # has_entries({"NHS_NUMBER": nhs_num_hash, "ATTRIBUTE_TYPE": "COHORTS"}),
77- # ),
78- # )
60+ def test_person_found_with_current_secret (person_table : Any ,
61+ persisted_person : NHSNumber ,
62+ hashing_service : HashingService ):
63+ # Given
64+ repo = PersonRepo (person_table , hashing_service )
65+
66+ # When
67+ actual = repo .get_eligibility_data (persisted_person )
68+
69+ # Then
70+ nhs_num_hash = hashing_service .hash_with_current_secret (persisted_person )
71+ nhs_num_hash_pre = hashing_service .hash_with_previous_secret (persisted_person )
72+
73+
74+ assert_that (
75+ actual .data ,
76+ contains_inanyorder (
77+ has_entries ({"NHS_NUMBER" : nhs_num_hash , "ATTRIBUTE_TYPE" : "PERSON" }),
78+ has_entries ({"NHS_NUMBER" : nhs_num_hash , "ATTRIBUTE_TYPE" : "COHORTS" }),
79+ ),
80+ )
0 commit comments