diff --git a/wagtail/search/tests/test_mysql_backend.py b/wagtail/search/tests/test_mysql_backend.py
index bb18201ef5..10fc8a9165 100644
--- a/wagtail/search/tests/test_mysql_backend.py
+++ b/wagtail/search/tests/test_mysql_backend.py
@@ -160,7 +160,7 @@ class TestMySQLSearchBackend(BackendTests, TransactionTestCase):
 
         with self.assertRaisesMessage(
             ValueError,
-            "Lexeme value 'hello world' must consist of alphanumeric characters "
+            "Lexeme value 'rimsky@korsakov' must consist of alphanumeric characters "
             "and '_' only.",
         ):
             Lexeme("rimsky@korsakov")