Skip to content

Commit

Permalink
fix: s/reset/reset_mock
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Aug 14, 2023
1 parent 56c32b7 commit 56465bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osf_tests/test_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def auth(self, project):
return Auth(project.creator)

def test_add_tag(self, mock_update_share, project, auth):
mock_update_share.reset_mock()
project.add_tag('scientific', auth=auth)
assert 'scientific' in list(project.tags.values_list('name', flat=True))
assert project.logs.latest().action == 'tag_added'
Expand All @@ -67,9 +68,10 @@ def test_add_tag_way_too_long(self, project, auth):
project.add_tag('asdf' * 257, auth=auth)

def test_remove_tag(self, mock_update_share, project, auth):
mock_update_share.reset_mock()
project.add_tag('scientific', auth=auth)
mock_update_share.assert_called_once_with(project)
mock_update_share.reset()
mock_update_share.reset_mock()
project.remove_tag('scientific', auth=auth)
mock_update_share.assert_called_once_with(project)
assert 'scientific' not in list(project.tags.values_list('name', flat=True))
Expand Down

0 comments on commit 56465bb

Please sign in to comment.