Skip to content

Commit

Permalink
Fix part of #7450: Replaced private methods in SuggestionServicesUnit…
Browse files Browse the repository at this point in the history
…Tests (#15001)

Co-authored-by: Gopi Vaibhav <gopivaibhav@pop-os.localdomain>
  • Loading branch information
gopivaibhav and Gopi Vaibhav authored Mar 16, 2022
1 parent 5036132 commit 9c38bcc
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions core/domain/suggestion_services_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,17 @@ def test_update_translation_suggestion_to_change_translation_html(self):
'content', '<p>old content html</p>').to_dict()
exploration.states['state 1'].update_content(
state_domain.SubtitledHtml.from_dict(old_content))
exp_services._save_exploration(self.author_id, exploration, '', []) # pylint: disable=protected-access
change_list = [exp_domain.ExplorationChange({
'cmd': exp_domain.CMD_EDIT_STATE_PROPERTY,
'property_name': exp_domain.STATE_PROPERTY_CONTENT,
'state_name': 'state 1',
'new_value': {
'content_id': 'content',
'html': '<p>old content html</p>'
}
})]
exp_services.update_exploration(
self.author_id, exploration.id, change_list, '')
add_translation_change_dict = {
'cmd': exp_domain.CMD_ADD_WRITTEN_TRANSLATION,
'state_name': 'state 1',
Expand Down Expand Up @@ -928,7 +938,17 @@ def test_accept_suggestion_commit_message_after_updating_a_suggestion(self):
'content', '<p>old content html</p>').to_dict()
exploration.states['state 1'].update_content(
state_domain.SubtitledHtml.from_dict(old_content))
exp_services._save_exploration(self.author_id, exploration, '', []) # pylint: disable=protected-access
change_list = [exp_domain.ExplorationChange({
'cmd': exp_domain.CMD_EDIT_STATE_PROPERTY,
'property_name': exp_domain.STATE_PROPERTY_CONTENT,
'state_name': 'state 1',
'new_value': {
'content_id': 'content',
'html': '<p>old content html</p>'
}
})]
exp_services.update_exploration(
self.author_id, exploration.id, change_list, '')
add_translation_change_dict = {
'cmd': exp_domain.CMD_ADD_WRITTEN_TRANSLATION,
'state_name': 'state 1',
Expand Down

0 comments on commit 9c38bcc

Please sign in to comment.