From 824e2ba88038bab5fe23ea3e9e9a0b687612c9df Mon Sep 17 00:00:00 2001 From: Dries Peeters Date: Fri, 24 Oct 2025 17:22:06 +0200 Subject: [PATCH] Update test_client_note_model.py --- tests/test_client_note_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_client_note_model.py b/tests/test_client_note_model.py index af10228..8c39dd9 100644 --- a/tests/test_client_note_model.py +++ b/tests/test_client_note_model.py @@ -168,7 +168,8 @@ def test_client_note_author_name_property(app, user, test_client): # Test with full name user.full_name = "Test User Full Name" db.session.commit() - # No need to refresh - the relationship will fetch the updated value + # Expire the cached relationship so it reloads with updated data + db.session.expire(note, ['author']) assert note.author_name == "Test User Full Name"