Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 19:30 UTC
Fix formating in test files
haxzie committed
Sep 30, 2025 at 12:32 UTC
da02059de09ad307bdc4e94b565bfbc07b5bb047
1 file changed
+9
-5
python/tests/test_schema_parser.py
+9
-5
@@ -502,10 +502,14 @@ class TestJsonSchemaToPydanticType:
502
args = result.__args__
503
assert str in args
504
# One should be a List type
505
- list_types = [arg for arg in args if hasattr(arg, "__origin__") and arg.__origin__ is list]
505
+ list_types = [
506
+ arg for arg in args if hasattr(arg, "__origin__") and arg.__origin__ is list
507
+ ]
508
assert len(list_types) == 1
509
# One should be a BaseModel subclass
508
- model_types = [arg for arg in args if isinstance(arg, type) and issubclass(arg, BaseModel)]
510
+ model_types = [
511
+ arg for arg in args if isinstance(arg, type) and issubclass(arg, BaseModel)
512
+ ]
513
assert len(model_types) >= 1
514
515
def test_oneof_nested_in_object(self):
@@ -526,16 +530,16 @@ class TestJsonSchemaToPydanticType:
530
},
531
"required": ["flexible_field"],
532
}
529
-
533
+
534
# Test that the model can be created
535
model_class = json_schema_to_model(json_schema)
532
-
536
+
537
# Test with different oneOf values
538
instance1 = model_class(flexible_field="hello", normal_field="world")
539
instance2 = model_class(flexible_field=42, normal_field="world")
540
instance3 = model_class(flexible_field=True, normal_field="world")
541
instance4 = model_class(flexible_field=3.14, normal_field="world")
538
-
542
+
543
assert instance1.flexible_field == "hello"
544
assert instance2.flexible_field == 42
545
assert instance3.flexible_field is True