Exemplo n.º 1
0
    def test_col_process_returns_404_with_bad_action(self, abort):
        cols_selected = ['source_id']
        self._set_up_request(cols_selected, 'something-random')

        journalist.col_process()

        abort.assert_called_with(ANY)
Exemplo n.º 2
0
    def test_col_process_delegates_to_col_un_star(self, col_un_star):
        cols_selected = ['source_id']
        self._set_up_request(cols_selected, 'un-star')

        journalist.col_process()

        col_un_star.assert_called_with(cols_selected)
Exemplo n.º 3
0
    def test_col_process_delegates_to_col_delete(self, col_delete):
        cols_selected = ['source_id']
        self._set_up_request(cols_selected, 'delete')

        journalist.col_process()

        col_delete.assert_called_with(cols_selected)
Exemplo n.º 4
0
    def test_col_process_returns_404_with_bad_action(self, abort):
        cols_selected = ['source_id']
        self.set_up_request(cols_selected, 'something-random')

        journalist.col_process()

        abort.assert_called_with(ANY)
Exemplo n.º 5
0
    def test_col_process_delegates_to_col_un_star(self, col_un_star):
        cols_selected = ['source_id']
        self.set_up_request(cols_selected, 'un-star')

        journalist.col_process()

        col_un_star.assert_called_with(cols_selected)
Exemplo n.º 6
0
    def test_col_process_delegates_to_col_delete(self, col_delete):
        cols_selected = ['source_id']
        self.set_up_request(cols_selected, 'delete')

        journalist.col_process()

        col_delete.assert_called_with(cols_selected)