From 76cbafc88dcacda6639dadb26f6e84c355453334 Mon Sep 17 00:00:00 2001 From: 491034170 <142008960+491034170@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:14:16 +0800 Subject: [PATCH] Read people conversation source tests as UTF-8 --- backend/tests/unit/test_people_conversations_500s.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/tests/unit/test_people_conversations_500s.py b/backend/tests/unit/test_people_conversations_500s.py index b391fbb28bd..1bc172e7c90 100644 --- a/backend/tests/unit/test_people_conversations_500s.py +++ b/backend/tests/unit/test_people_conversations_500s.py @@ -169,7 +169,7 @@ def test_list_endpoint_uses_without_photos(self): import os router_path = os.path.join(os.path.dirname(__file__), '..', '..', 'routers', 'conversations.py') - with open(router_path) as f: + with open(router_path, encoding='utf-8') as f: source = f.read() # The list endpoint function should call get_conversations_without_photos assert 'get_conversations_without_photos' in source @@ -179,7 +179,7 @@ def test_get_conversations_without_photos_has_folder_starred(self): import os db_path = os.path.join(os.path.dirname(__file__), '..', '..', 'database', 'conversations.py') - with open(db_path) as f: + with open(db_path, encoding='utf-8') as f: source = f.read() # Find the function definition and check its parameters assert 'def get_conversations_without_photos(' in source @@ -199,7 +199,7 @@ def test_without_photos_function_not_decorated_with_photos(self): import re db_path = os.path.join(os.path.dirname(__file__), '..', '..', 'database', 'conversations.py') - with open(db_path) as f: + with open(db_path, encoding='utf-8') as f: source = f.read() # Find the function definition and the lines preceding it (decorators) @@ -223,7 +223,7 @@ def test_with_photos_present_on_get_conversations(self): import os db_path = os.path.join(os.path.dirname(__file__), '..', '..', 'database', 'conversations.py') - with open(db_path) as f: + with open(db_path, encoding='utf-8') as f: source = f.read() lines = source.split('\n')