From fd96229a60b6ee1ff5a86af22f89f5d3f9ea768a Mon Sep 17 00:00:00 2001 From: Jackson Goerner Date: Wed, 30 Oct 2024 12:18:09 +1100 Subject: [PATCH] Have another shot at fixing the user data tests. Signed-off-by: Jackson Goerner --- .../tests/unit/extractor/test_mysql_search_data_extractor.py | 2 +- .../tests/unit/models/test_user_elasticsearch_document.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/databuilder/tests/unit/extractor/test_mysql_search_data_extractor.py b/databuilder/tests/unit/extractor/test_mysql_search_data_extractor.py index 7e6c8641b..1ff6237da 100644 --- a/databuilder/tests/unit/extractor/test_mysql_search_data_extractor.py +++ b/databuilder/tests/unit/extractor/test_mysql_search_data_extractor.py @@ -137,7 +137,7 @@ def test_user_search(self, manager = User(rk='test_manager_key', email='test_manager@email.com') user.manager = manager - expected_dict = dict(name='test_first_name test_last_name', + expected_dict = dict(name='test_full_name', email='test_user@email.com', first_name='test_first_name', last_name='test_last_name', diff --git a/databuilder/tests/unit/models/test_user_elasticsearch_document.py b/databuilder/tests/unit/models/test_user_elasticsearch_document.py index 6bf0da82c..ec3bc70c1 100644 --- a/databuilder/tests/unit/models/test_user_elasticsearch_document.py +++ b/databuilder/tests/unit/models/test_user_elasticsearch_document.py @@ -29,7 +29,8 @@ def test_to_json(self) -> None: total_own=3, total_follow=1) - expected_document_dict = {"first_name": "test_firstname", + expected_document_dict = {"name": "test_firstname test_lastname", + "first_name": "test_firstname", "last_name": "test_lastname", "full_name": "full_name", "team_name": "team",