File tree Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ Changelog
6
6
Added
7
7
^^^^^
8
8
- 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> `
12
10
and :meth: `SearchRequest.start_index_1 <scim2_models.SearchRequest.start_index_1> `.
13
11
14
12
[0.2.10] - 2024-12-02
Original file line number Diff line number Diff line change @@ -121,17 +121,3 @@ def check_results_number(
121
121
)
122
122
123
123
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():
74
74
}
75
75
with pytest .raises (ValidationError ):
76
76
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