File tree Expand file tree Collapse file tree
openedx/core/djangoapps/content_libraries/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1074,11 +1074,12 @@ def test_container_draft_history_includes_descendant_components(self):
10741074 history = self ._get_container_draft_history (unit ["id" ])
10751075 changed_at_list = [entry ["changed_at" ] for entry in history ]
10761076 # Both the container edit and the block edit should appear in the history.
1077- assert block_edit_time .isoformat ().replace ("+00:00" , "Z" ) in changed_at_list
1078- assert container_edit_time .isoformat ().replace ("+00:00" , "Z" ) in changed_at_list
1077+ block_edit_time_str = block_edit_time .isoformat ().replace ("+00:00" , "Z" )
1078+ container_edit_time_str = container_edit_time .isoformat ().replace ("+00:00" , "Z" )
1079+ assert block_edit_time_str in changed_at_list
1080+ assert container_edit_time_str in changed_at_list
10791081 # History is sorted newest-first, so the block edit should come before the container edit.
1080- assert changed_at_list .index (block_edit_time .isoformat ().replace ("+00:00" , "Z" )) < \
1081- changed_at_list .index (container_edit_time .isoformat ().replace ("+00:00" , "Z" ))
1082+ assert changed_at_list .index (block_edit_time_str ) < changed_at_list .index (container_edit_time_str )
10821083
10831084 def test_container_draft_history_action_renamed (self ):
10841085 """
You can’t perform that action at this time.
0 commit comments