def test_remove_star_makes_commits(self, db_session): journalist.remove_star('sid') db_session.commit.assert_called_with()
def test_remove_star_delegates_to_make_star_false(self, make_star_false): sid = 'sid' journalist.remove_star(sid) make_star_false.assert_called_with(sid)
def test_remove_star_renders_template(self, redirect, url_for): redirect_template = journalist.remove_star('sid') self.assertEqual(redirect_template, redirect(url_for('index')))
def test_remove_star_delegates_to_make_star_false(self, make_star_false): filesystem_id = 'filesystem_id' journalist.remove_star(filesystem_id) make_star_false.assert_called_with(filesystem_id)