File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 88from scim2_models .context import Context
99from scim2_models .messages .error import Error
1010from scim2_models .messages .patch_op import PatchOp
11+ from scim2_models .reference import Reference
1112from scim2_models .resources .enterprise_user import EnterpriseUser
1213from scim2_models .resources .resource import Extension
1314from scim2_models .resources .resource import Meta
@@ -25,12 +26,16 @@ class Sup(Resource):
2526 dummy : str
2627 sub : Sub
2728 subs : list [Sub ]
29+ ref : Reference [Sub ]
30+ refunion : Reference [Sub | User ]
2831
2932
3033def test_guess_root_type ():
3134 assert Sup .get_field_root_type ("dummy" ) is str
3235 assert Sup .get_field_root_type ("sub" ) == Sub
3336 assert Sup .get_field_root_type ("subs" ) == Sub
37+ assert Sup .get_field_root_type ("ref" ) == Reference [Sub ]
38+ assert Sup .get_field_root_type ("refunion" ) == Reference [Sub | User ]
3439
3540
3641class ReturnedModel (BaseModel ):
You can’t perform that action at this time.
0 commit comments