Skip to content

Commit 604ba2d

Browse files
Increase coverage
1 parent 94c4090 commit 604ba2d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/datasources/test_rdi.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
extract_images,
2323
merge_images,
2424
read_sheets,
25+
full_name_column,
2526
# validate_households,
2627
)
2728
from country_workspace.models import Household
@@ -306,3 +307,15 @@ def test_read_sheets(mocker: MockerFixture) -> None:
306307
extract_images_mock.assert_called_once_with(filepath, sheet_index)
307308
merge_images_mock.assert_called_once_with(sheet, images)
308309
filter_rows_with_household_pk_mock.assert_called_once_with(config_mock, merge_images_mock.return_value)
310+
311+
312+
@pytest.mark.parametrize(
313+
("record", "expected"),
314+
[
315+
({"full_name": "John Smith"}, "full_name"),
316+
({}, None),
317+
({"name_full": "John Smith"}, None),
318+
],
319+
)
320+
def test_full_name_column(record: Record, expected: str | None) -> None:
321+
assert full_name_column(record) == expected

0 commit comments

Comments
 (0)