Author: rjollos
Date: Mon Mar 25 18:52:58 2013
New Revision: 1460843

URL: http://svn.apache.org/r1460843
Log:
Fixes #469: Fix for failing `BatchModify` unit test cases. The `TicketSystem` 
implements the `ITicketFieldProvider` interface, and also calls a method of the 
`ITicketFieldProvider` interface to get a list containing the ticket fields. 
When the `api.TicketSystem` component is not enabled, the fields provided by 
that class won't be returned in the call `TicketSystem.get_ticket_fields`. The 
fields returned by `TicketSystem.get_select_fields` and 
`TicketSystem.get_radio_fields` are "built-in" ticket fields, which some cases 
expect to be returned through the call `TicketSystem.get_ticket_fields`.

Thank to Olemis for the patch.

Modified:
    incubator/bloodhound/trunk/trac/trac/ticket/tests/batch.py

Modified: incubator/bloodhound/trunk/trac/trac/ticket/tests/batch.py
URL: 
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/trac/trac/ticket/tests/batch.py?rev=1460843&r1=1460842&r2=1460843&view=diff
==============================================================================
--- incubator/bloodhound/trunk/trac/trac/ticket/tests/batch.py (original)
+++ incubator/bloodhound/trunk/trac/trac/ticket/tests/batch.py Mon Mar 25 
18:52:58 2013
@@ -1,6 +1,6 @@
 from trac.perm import PermissionCache
 from trac.test import Mock, EnvironmentStub
-from trac.ticket import default_workflow, web_ui
+from trac.ticket import api, default_workflow, web_ui
 from trac.ticket.batch import BatchModifyModule
 from trac.ticket.model import Ticket
 from trac.util.datefmt import utc
@@ -13,7 +13,8 @@ class BatchModifyTestCase(unittest.TestC
     def setUp(self):
         self.env = EnvironmentStub(default_data=True,
             enable=[default_workflow.ConfigurableTicketWorkflow,
-                    web_ui.TicketModule])
+                    web_ui.TicketModule, 
+                    api.TicketSystem])
         self.req = Mock(href=self.env.href, authname='anonymous', tz=utc)
         self.req.session = {}
         self.req.perm = PermissionCache(self.env)


Reply via email to