Skip to content

Commit b628852

Browse files
committed
refactor: remove useless code
1 parent a381d37 commit b628852

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

scim2_tester/utils.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Import ExceptionGroup for Python < 3.11 compatibility
1515
if sys.version_info >= (3, 11):
1616
from builtins import ExceptionGroup
17-
else:
17+
else: # pragma: no cover
1818
from exceptiongroup import ExceptionGroup
1919

2020
# Global registry for all tags discovered by checker decorators
@@ -167,13 +167,6 @@ def create_and_register(self, model: type[Resource[Any]]) -> Resource[Any]:
167167
if model.get_field_annotation(field_name, Required) == Required.true
168168
]
169169
obj = fill_with_random_values(self.context, model(), self, field_names)
170-
171-
# Should not happen since we're filling required fields, but handle just in case
172-
if obj is None:
173-
raise ValueError(
174-
f"Could not create valid {model.__name__} object with required fields"
175-
)
176-
177170
created = self.context.client.create(obj)
178171

179172
# Handle the case where create might return Error or dict

0 commit comments

Comments
 (0)