|
8 | 8 | from scim2_models.annotations import Returned |
9 | 9 | from scim2_models.annotations import Uniqueness |
10 | 10 | from scim2_models.attributes import ComplexAttribute |
11 | | -from scim2_models.attributes import MultiValuedComplexAttribute |
12 | 11 | from scim2_models.reference import ExternalReference |
13 | 12 | from scim2_models.reference import Reference |
14 | 13 | from scim2_models.reference import URIReference |
@@ -408,7 +407,7 @@ def test_make_user_model_from_schema(load_sample): |
408 | 407 | # emails |
409 | 408 | Emails = User.get_field_root_type("emails") |
410 | 409 | assert Emails == User.Emails |
411 | | - assert issubclass(Emails, MultiValuedComplexAttribute) |
| 410 | + assert issubclass(Emails, ComplexAttribute) |
412 | 411 | assert User.get_field_multiplicity("emails") |
413 | 412 | assert ( |
414 | 413 | User.model_fields["emails"].description |
@@ -476,7 +475,7 @@ def test_make_user_model_from_schema(load_sample): |
476 | 475 | # phone_numbers |
477 | 476 | PhoneNumbers = User.get_field_root_type("phone_numbers") |
478 | 477 | assert PhoneNumbers == User.PhoneNumbers |
479 | | - assert issubclass(PhoneNumbers, MultiValuedComplexAttribute) |
| 478 | + assert issubclass(PhoneNumbers, ComplexAttribute) |
480 | 479 | assert User.get_field_multiplicity("phone_numbers") |
481 | 480 | assert ( |
482 | 481 | User.model_fields["phone_numbers"].description |
@@ -560,7 +559,7 @@ def test_make_user_model_from_schema(load_sample): |
560 | 559 | # ims |
561 | 560 | Ims = User.get_field_root_type("ims") |
562 | 561 | assert Ims == User.Ims |
563 | | - assert issubclass(Ims, MultiValuedComplexAttribute) |
| 562 | + assert issubclass(Ims, ComplexAttribute) |
564 | 563 | assert User.get_field_multiplicity("ims") |
565 | 564 | assert ( |
566 | 565 | User.model_fields["ims"].description |
@@ -637,7 +636,7 @@ def test_make_user_model_from_schema(load_sample): |
637 | 636 | # photos |
638 | 637 | Photos = User.get_field_root_type("photos") |
639 | 638 | assert Photos == User.Photos |
640 | | - assert issubclass(Photos, MultiValuedComplexAttribute) |
| 639 | + assert issubclass(Photos, ComplexAttribute) |
641 | 640 | assert User.get_field_multiplicity("photos") |
642 | 641 | assert User.model_fields["photos"].description == "URLs of photos of the User." |
643 | 642 | assert User.get_field_annotation("photos", Required) == Required.false |
@@ -699,7 +698,7 @@ def test_make_user_model_from_schema(load_sample): |
699 | 698 | # addresses |
700 | 699 | Addresses = User.get_field_root_type("addresses") |
701 | 700 | assert Addresses == User.Addresses |
702 | | - assert issubclass(Addresses, MultiValuedComplexAttribute) |
| 701 | + assert issubclass(Addresses, ComplexAttribute) |
703 | 702 | assert User.get_field_multiplicity("addresses") |
704 | 703 | assert ( |
705 | 704 | User.model_fields["addresses"].description |
@@ -837,7 +836,7 @@ def test_make_user_model_from_schema(load_sample): |
837 | 836 | # groups |
838 | 837 | Groups = User.get_field_root_type("groups") |
839 | 838 | assert Groups == User.Groups |
840 | | - assert issubclass(Groups, MultiValuedComplexAttribute) |
| 839 | + assert issubclass(Groups, ComplexAttribute) |
841 | 840 | assert User.get_field_multiplicity("groups") |
842 | 841 | assert ( |
843 | 842 | User.model_fields["groups"].description |
@@ -911,7 +910,7 @@ def test_make_user_model_from_schema(load_sample): |
911 | 910 | # entitlements |
912 | 911 | Entitlements = User.get_field_root_type("entitlements") |
913 | 912 | assert Entitlements == User.Entitlements |
914 | | - assert issubclass(Entitlements, MultiValuedComplexAttribute) |
| 913 | + assert issubclass(Entitlements, ComplexAttribute) |
915 | 914 | assert User.get_field_multiplicity("entitlements") |
916 | 915 | assert ( |
917 | 916 | User.model_fields["entitlements"].description |
@@ -989,7 +988,7 @@ def test_make_user_model_from_schema(load_sample): |
989 | 988 | # roles |
990 | 989 | Roles = User.get_field_root_type("roles") |
991 | 990 | assert Roles == User.Roles |
992 | | - assert issubclass(Roles, MultiValuedComplexAttribute) |
| 991 | + assert issubclass(Roles, ComplexAttribute) |
993 | 992 | assert User.get_field_multiplicity("roles") |
994 | 993 | assert ( |
995 | 994 | User.model_fields["roles"].description |
@@ -1053,7 +1052,7 @@ def test_make_user_model_from_schema(load_sample): |
1053 | 1052 | # x_509_certificates |
1054 | 1053 | X509Certificates = User.get_field_root_type("x_509_certificates") |
1055 | 1054 | assert X509Certificates == User.X509Certificates |
1056 | | - assert issubclass(X509Certificates, MultiValuedComplexAttribute) |
| 1055 | + assert issubclass(X509Certificates, ComplexAttribute) |
1057 | 1056 | assert User.get_field_multiplicity("x_509_certificates") |
1058 | 1057 | assert ( |
1059 | 1058 | User.model_fields["x_509_certificates"].description |
@@ -2210,7 +2209,7 @@ def test_make_schema_model_from_schema(load_sample): |
2210 | 2209 | # attributes |
2211 | 2210 | Attributes = Schema_.get_field_root_type("attributes") |
2212 | 2211 | assert Attributes == Schema_.Attributes |
2213 | | - assert issubclass(Attributes, MultiValuedComplexAttribute) |
| 2212 | + assert issubclass(Attributes, ComplexAttribute) |
2214 | 2213 | assert Schema_.get_field_multiplicity("attributes") |
2215 | 2214 | assert ( |
2216 | 2215 | Schema_.model_fields["attributes"].description |
@@ -2440,7 +2439,7 @@ def test_make_schema_model_from_schema(load_sample): |
2440 | 2439 | # sub_attributes |
2441 | 2440 | SubAttributes = Attributes.get_field_root_type("sub_attributes") |
2442 | 2441 | assert SubAttributes == Attributes.SubAttributes |
2443 | | - assert issubclass(SubAttributes, MultiValuedComplexAttribute) |
| 2442 | + assert issubclass(SubAttributes, ComplexAttribute) |
2444 | 2443 | assert Attributes.get_field_multiplicity("sub_attributes") |
2445 | 2444 | assert ( |
2446 | 2445 | Attributes.model_fields["sub_attributes"].description |
|
0 commit comments