File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ async def test_get_relationship_info_tags(
230230 assert rel_info .format == format
231231
232232
233- async def test_invalid_object_expansion_strategy (
233+ async def test_invalid_object_expansion_processor (
234234 client : InfrahubClient , mock_schema_query_01 : HTTPXMock , location_expansion
235235) -> None :
236236 obj = ObjectFile (location = "some/path" , content = location_expansion )
@@ -246,3 +246,12 @@ async def test_invalid_object_expansion_strategy(
246246 assert "Unknown strategy" in str (exc .value )
247247 finally :
248248 DataProcessorFactory ._processors = original_processors
249+
250+
251+ async def test_invalid_object_expansion_strategy (client : InfrahubClient , location_expansion ) -> None :
252+ location_expansion ["spec" ]["strategy" ] = "InvalidStrategy"
253+ obj = ObjectFile (location = "some/path" , content = location_expansion )
254+
255+ with pytest .raises (ValidationError ) as exc :
256+ await obj .validate_format (client = client )
257+ assert "Input should be" in str (exc .value )
You can’t perform that action at this time.
0 commit comments