Skip to content

Commit

Permalink
adding another test for get_block_data
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbuckley committed Sep 19, 2024
1 parent de79ec4 commit eb5511f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/unit/test_simple_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,15 @@ def test_match_on_birthdate_and_first_name(self, session, prime_index):
algo_config = {"blocks": [{"value": "birthdate"}, {"value": "first_name"}]}
matches = simple_mpi.get_block_data(session, data, algo_config)
assert len(matches) == 4

def test_match_on_birthdate_first_name_and_last_name(self, session, prime_index):
data = {"name": [{"given": ["Johnathon", "Bill",], "family": "Smith"}], "birthdate": "01/01/1980"}
algo_config = {"blocks": [{"value": "birthdate"}, {"value": "first_name"}, {"value": "last_name"}]}
matches = simple_mpi.get_block_data(session, data, algo_config)
assert len(matches) == 3
data = {"name": [{"given": ["Billy",], "family": "Smitty"}], "birthdate": "Jan 1 1980"}
matches = simple_mpi.get_block_data(session, data, algo_config)
assert len(matches) == 2
data = {"name": [{"given": ["Johnathon", "Bill",], "family": "Doeherty"}], "birthdate": "Jan 1 1980"}
matches = simple_mpi.get_block_data(session, data, algo_config)
assert len(matches) == 0

0 comments on commit eb5511f

Please sign in to comment.