File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ Changelog
66Added
77^^^^^
88- Implement :meth: `Schema.get_attribute <scim2_models.Schema.get_attribute> `.
9- - Implement :meth: `ListResponse.start_index_0 <scim2_models.ListResponse.start_index_0> `
10- and :meth: `ListResponse.start_index_1 <scim2_models.ListResponse.start_index_1> `
11- and :meth: `SearchRequest.start_index_0 <scim2_models.SearchRequest.start_index_0> `
9+ - Implement :meth: `SearchRequest.start_index_0 <scim2_models.SearchRequest.start_index_0> `
1210 and :meth: `SearchRequest.start_index_1 <scim2_models.SearchRequest.start_index_1> `.
1311
1412[0.2.10] - 2024-12-02
Original file line number Diff line number Diff line change @@ -121,17 +121,3 @@ def check_results_number(
121121 )
122122
123123 return obj
124-
125- @property
126- def start_index_0 (self ):
127- """The 0 indexed start index."""
128- return self .start_index - 1 if self .start_index is not None else None
129-
130- @property
131- def stop_index_0 (self ):
132- """The 0 indexed stop index."""
133- return (
134- self .start_index_0 + self .count
135- if self .start_index_0 is not None and self .count is not None
136- else None
137- )
Original file line number Diff line number Diff line change @@ -74,3 +74,9 @@ def test_attributes_or_excluded_attributes():
7474 }
7575 with pytest .raises (ValidationError ):
7676 SearchRequest .model_validate (payload )
77+
78+
79+ def test_index_0_properties ():
80+ req = SearchRequest (start_index = 1 , count = 10 )
81+ assert req .start_index_0 == 0
82+ assert req .stop_index_0 == 10
You can’t perform that action at this time.
0 commit comments