incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1460843 - /incubator/bloodhound/trunk/trac/trac/ticket/tests/
Date Mon, 25 Mar 2013 18:52:58 GMT
Author: rjollos
Date: Mon Mar 25 18:52:58 2013
New Revision: 1460843

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/
--- incubator/bloodhound/trunk/trac/trac/ticket/tests/ (original)
+++ incubator/bloodhound/trunk/trac/trac/ticket/tests/ 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,
-                    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)

View raw message