Commits

Olemis Lang committed cf1e4f8

Bloodhound RPC : Bloodhound test setup . TicketModule => ProductTicketModule

  • Participants
  • Parent commits 33d73a0

Comments (0)

Files changed (2)

File trunk/tracrpc/tests/__init__.py

             SvnFunctionalTestEnvironment.init(self)
             self.url = "%s:%s" % (self.url, self.port)
 
+        def _bloodhound_install(self, env):
+            print "Disabling Trac components overriden by Bloodhound..."
+            env.config.set('components', 'trac.ticket.web_ui.*', 'disabled')
+            env.config.set('components', 'trac.ticket.report.*', 'disabled')
+
+            print "Enabling Bloodhound multi-product plugin..."
+            env.config.set('components', 'multiproduct.*', 'enabled')
+            env.config.save()
+
+            print "Upgrading to multi-product environment ..."
+            self._tracadmin('upgrade', wait=True)
+            
+
         def post_create(self, env):
+            self._bloodhound_install(env)
+
             print "Enabling RPC plugin and permissions..."
             env.config.set('components', 'tracrpc.*', 'enabled')
+
             env.config.save()
             self.getLogger = lambda : env.log
             self._tracadmin('permission', 'add', 'anonymous', 'XML_RPC')

File trunk/tracrpc/ticket.py

 import trac.ticket.query as query
 from trac.ticket.api import TicketSystem
 from trac.ticket.notification import TicketNotifyEmail
-from trac.ticket.web_ui import TicketModule
 from trac.web.chrome import add_warning
 from trac.util.datefmt import to_datetime, utc
 
 from tracrpc.api import IXMLRPCHandler, expose_rpc, Binary
 from tracrpc.util import StringIO, to_utimestamp, from_utimestamp
 
+from multiproduct.ticket.web_ui import ProductTicketModule
+
 __all__ = ['TicketRPC']
 
 class TicketRPC(Component):
             t.save_changes(author, comment, when=when)
         else:
             ts = TicketSystem(self.env)
-            tm = TicketModule(self.env)
+            tm = ProductTicketModule(self.env)
             # TODO: Deprecate update without time_changed timestamp
             time_changed = attributes.pop('_ts', to_utimestamp(t.time_changed))
             try:
             for k, v in attributes.iteritems():
                 if k in all_fields and k != 'status':
                     t[k] = v
-            # TicketModule reads req.args - need to move things there...
+            # ProductTicketModule reads req.args - need to move things there...
             req.args.update(attributes)
             req.args['comment'] = comment
             # Collision detection: 0.11+0.12 timestamp