def test_add_star_makes_commits(self, db_session): journalist.add_star('sid') db_session.commit.assert_called_with()
def test_single_delegates_to_make_star_true(self, make_star_true): sid = 'sid' journalist.add_star(sid) make_star_true.assert_called_with(sid)
def test_add_star_renders_template(self, redirect, url_for): redirect_template = journalist.add_star('sid') self.assertEqual(redirect_template, redirect(url_for('index')))
def test_single_delegates_to_make_star_true(self, make_star_true): filesystem_id = 'filesystem_id' journalist.add_star(filesystem_id) make_star_true.assert_called_with(filesystem_id)