@@ -44,7 +44,7 @@ class SchemaCompatibilityTestCase(BaseTestCase):
4444 register_baseline_schemas : SchemaRegitrationFunc
4545 expected_is_compatible : bool | None
4646 expected_status_code : int
47- expected_incompatibilities : str | None
47+ expected_incompatibilities : list [ str ] | None
4848
4949
5050async def _register_baseline_schemas_no_incompatibilities (registry_async_client : Client , subject : Subject ) -> None :
@@ -149,7 +149,7 @@ async def _set_compatibility_mode(registry_async_client: Client, subject: Subjec
149149 new_schema = json .dumps (schema_int ),
150150 expected_is_compatible = False ,
151151 expected_status_code = 200 ,
152- expected_incompatibilities = "reader type: int not compatible with writer type: double" ,
152+ expected_incompatibilities = [ "reader type: int not compatible with writer type: double" ] ,
153153 ),
154154 # Case 3
155155 # Same as previous case, but in non-transitive mode
@@ -161,7 +161,7 @@ async def _set_compatibility_mode(registry_async_client: Client, subject: Subjec
161161 new_schema = json .dumps (schema_int ),
162162 expected_is_compatible = False ,
163163 expected_status_code = 200 ,
164- expected_incompatibilities = "reader type: int not compatible with writer type: string" ,
164+ expected_incompatibilities = [ "reader type: int not compatible with writer type: string" ] ,
165165 ),
166166 # Case 4
167167 # Same as case 2, but with a deleted schema among baseline ones
@@ -175,7 +175,7 @@ async def _set_compatibility_mode(registry_async_client: Client, subject: Subjec
175175 new_schema = json .dumps (schema_int ),
176176 expected_is_compatible = False ,
177177 expected_status_code = 200 ,
178- expected_incompatibilities = "reader type: int not compatible with writer type: double" ,
178+ expected_incompatibilities = [ "reader type: int not compatible with writer type: double" ] ,
179179 ),
180180 # Case 5
181181 # Same as case 3, but with a deleted schema among baseline ones
@@ -188,7 +188,7 @@ async def _set_compatibility_mode(registry_async_client: Client, subject: Subjec
188188 new_schema = json .dumps (schema_int ),
189189 expected_is_compatible = False ,
190190 expected_status_code = 200 ,
191- expected_incompatibilities = "reader type: int not compatible with writer type: string" ,
191+ expected_incompatibilities = [ "reader type: int not compatible with writer type: string" ] ,
192192 ),
193193 # Case 6
194194 # A new schema and no baseline schemas
@@ -232,4 +232,4 @@ async def test_schema_compatibility(test_case: SchemaCompatibilityTestCase, regi
232232
233233 assert res .status_code == test_case .expected_status_code
234234 assert res .json ().get ("is_compatible" ) == test_case .expected_is_compatible
235- assert res .json ().get ("incompatibilities" , None ) == test_case .expected_incompatibilities
235+ assert res .json ().get ("messages" ) == test_case .expected_incompatibilities
0 commit comments