예제 #1
0
    def test_remove_star_makes_commits(self, db_session):
        journalist.remove_star('sid')

        db_session.commit.assert_called_with()
예제 #2
0
    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)
예제 #3
0
    def test_remove_star_renders_template(self, redirect, url_for):
        redirect_template = journalist.remove_star('sid')

        self.assertEqual(redirect_template, redirect(url_for('index')))
예제 #4
0
    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)
예제 #5
0
    def test_remove_star_makes_commits(self, db_session):
        journalist.remove_star('sid')

        db_session.commit.assert_called_with()
예제 #6
0
    def test_remove_star_renders_template(self, redirect, url_for):
        redirect_template = journalist.remove_star('sid')

        self.assertEqual(redirect_template, redirect(url_for('index')))
예제 #7
0
    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)