@@ -142,6 +142,54 @@ def test_get_active_rights_acts(self):
142142 output = get_active_rights_acts (acts )
143143 self .assertEqual (output , expected )
144144
145+ acts = [
146+ {
147+ 'start_date' : '1886-01-01' ,
148+ 'end_date' : '1967-12-31' ,
149+ 'created_by' : 'aquarius' ,
150+ 'last_modified_by' : 'aquarius' ,
151+ 'create_time' : '2022-06-08T20:55:05Z' ,
152+ 'system_mtime' : '2022-06-08T20:55:05Z' ,
153+ 'user_mtime' : '2022-06-08T20:55:05Z' ,
154+ 'act_type' : 'publish' ,
155+ 'restriction' :
156+ 'disallow' ,
157+ 'jsonmodel_type' :
158+ 'rights_statement_act' ,
159+ 'notes' : []
160+ },
161+ {
162+ 'start_date' : '1886-01-01' ,
163+ 'created_by' : 'aquarius' ,
164+ 'last_modified_by' : 'aquarius' ,
165+ 'create_time' : '2022-06-08T20:55:05Z' ,
166+ 'system_mtime' : '2022-06-08T20:55:05Z' ,
167+ 'user_mtime' : '2022-06-08T20:55:05Z' ,
168+ 'act_type' : 'publish' ,
169+ 'restriction' :
170+ 'disallow' ,
171+ 'jsonmodel_type' :
172+ 'rights_statement_act' ,
173+ 'notes' : []
174+ }]
175+ expected = [
176+ {
177+ 'start_date' : '1886-01-01' ,
178+ 'created_by' : 'aquarius' ,
179+ 'last_modified_by' : 'aquarius' ,
180+ 'create_time' : '2022-06-08T20:55:05Z' ,
181+ 'system_mtime' : '2022-06-08T20:55:05Z' ,
182+ 'user_mtime' : '2022-06-08T20:55:05Z' ,
183+ 'act_type' : 'publish' ,
184+ 'restriction' :
185+ 'disallow' ,
186+ 'jsonmodel_type' :
187+ 'rights_statement_act' ,
188+ 'notes' : []
189+ }]
190+ output = get_active_rights_acts (acts )
191+ self .assertEqual (output , expected )
192+
145193 @patch ("asnake.client.web_client.ASnakeClient" )
146194 def test_get_resource_creators (self , mock_client ):
147195 mock_client .get .return_value .json .return_value = {"results" : [{"title" : "Philanthropy Foundation" }]}
0 commit comments