@@ -28,7 +28,7 @@ def reset_asyncapi_state():
2828
2929
3030# Test message models
31- class TestMessage (BaseModel ):
31+ class SomeTestMessage (BaseModel ):
3232 content : str
3333 timestamp : int
3434
@@ -103,31 +103,31 @@ def test_register_channel_operation(reset_asyncapi_state):
103103
104104 register_channel (address = "test/topic" , id = channel_id )
105105 register_channel_operation (
106- channel_id = channel_id , operation_type = operation_type , messages = [TestMessage ], operation_name = "test-operation"
106+ channel_id = channel_id , operation_type = operation_type , messages = [SomeTestMessage ], operation_name = "test-operation"
107107 )
108108
109109 schema = get_schema ()
110110 assert "test-operation" in schema .operations
111111 assert schema .operations ["test-operation" ].action == operation_type
112112 assert schema .operations ["test-operation" ].channel .ref == f"#/channels/{ channel_id } "
113- assert TestMessage .__name__ in schema .components .schemas
113+ assert SomeTestMessage .__name__ in schema .components .schemas
114114
115115
116116def test_register_channel_operation_invalid_channel (reset_asyncapi_state ):
117117 """Test channel operation registration with invalid channel"""
118118 with pytest .raises (ValueError , match = "Channel non-existent does not exist" ):
119- register_channel_operation (channel_id = "non-existent" , operation_type = "receive" , messages = [TestMessage ])
119+ register_channel_operation (channel_id = "non-existent" , operation_type = "receive" , messages = [SomeTestMessage ])
120120
121121
122122def test_multiple_messages_registration (reset_asyncapi_state ):
123123 """Test registration of multiple messages for an operation"""
124124 channel_id = "test-channel"
125125
126126 register_channel (address = "test/topic" , id = channel_id )
127- register_channel_operation (channel_id = channel_id , operation_type = "send" , messages = [TestMessage , AnotherTestMessage ])
127+ register_channel_operation (channel_id = channel_id , operation_type = "send" , messages = [SomeTestMessage , AnotherTestMessage ])
128128
129129 schema = get_schema ()
130- assert TestMessage .__name__ in schema .components .schemas
130+ assert SomeTestMessage .__name__ in schema .components .schemas
131131 assert AnotherTestMessage .__name__ in schema .components .schemas
132- assert TestMessage .__name__ in schema .channels [channel_id ].messages
132+ assert SomeTestMessage .__name__ in schema .channels [channel_id ].messages
133133 assert AnotherTestMessage .__name__ in schema .channels [channel_id ].messages
0 commit comments