You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bloodhound.apache.org by Ryan Ollos <ry...@wandisco.com> on 2013/03/16 21:42:13 UTC
Re: [Apache Bloodhound] #469: Some batch modify unit test cases are failing
On Sat, Mar 16, 2013 at 1:39 PM, Apache Bloodhound <
bloodhound-dev@incubator.apache.org> wrote:
> #469: Some batch modify unit test cases are failing
> ----------------------------------+--------------------
> Reporter: rjollos | Owner: nobody
> Type: defect | Status: new
> Priority: major | Milestone:
> Component: dashboard | Version: 0.4.0
> Keywords: ITicketFieldProvider |
> ----------------------------------+--------------------
> Several unit test cases in `trac.ticket.tests.batch.py` are failing. I've
> traced the failure of `test_add_batchmod_value_data_from_request` into
> `_get_new_ticket_values` , and
> `TicketSystem(self.env).get_ticket_fields()` is not returning `milestone`
> in the list due to the implementation of the in `ITicketFieldProvider`
> r1301116.
>
> {{{
> .EE....................E.
> ======================================================================
> ERROR: test_action_with_state_change (__main__.BatchModifyTestCase)
> Actions can have change status.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "trac/ticket/tests/batch.py", line 224, in
> test_action_with_state_change
> self.assertFieldChanged(first_ticket_id, 'status', 'big')
> File "trac/ticket/tests/batch.py", line 30, in assertFieldChanged
> field_change = [c for c in changes if c[2] == field][0]
> IndexError: list index out of range
>
> ======================================================================
> ERROR: test_add_batchmod_value_data_from_request
> (__main__.BatchModifyTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "trac/ticket/tests/batch.py", line 73, in
> test_add_batchmod_value_data_from_request
> self.assertEqual(values['milestone'], 'milestone1')
> KeyError: 'milestone'
>
> ======================================================================
> ERROR: test_save_values (__main__.BatchModifyTestCase)
> Changed values are saved to all tickets.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "trac/ticket/tests/batch.py", line 206, in test_save_values
> self.assertFieldChanged(first_ticket_id, 'component', 'bar')
> File "trac/ticket/tests/batch.py", line 30, in assertFieldChanged
> field_change = [c for c in changes if c[2] == field][0]
> IndexError: list index out of range
>
> ----------------------------------------------------------------------
> Ran 25 tests in 0.432s
>
> FAILED (errors=3)
> }}}
I'm not sure how to address this, but I haven't spent time digging into the
implementation of ITicketFieldProvider. It seems problematic to change the
behavior of `TicketSystem.get_ticket_fields` as it could break plugins and
other parts of Trac.