Commits

Olemis Lang  committed cf1556b

BH Multiproduct #355 : Correct product name and TRAC_VERSION inserted in ticket RSS feed

All test cases pass up to ticket conversion and prior to applying model test cases patch

  • Participants
  • Parent commits 1c6735a
  • Branches t355_trac_test_suite

Comments (0)

Files changed (1)

File t355/t355_r1442601_trac_test_ticket_conversion.diff

 # HG changeset patch
-# Parent 8e42500c130bb34e9a19ab940ba85afbfc762913
+# Parent bfe4d0a12be192118b0d452323d2d15d162ae451
 BH Multiproduct #355 : Rewrite Trac test cases for MIME conversions so as to run them against product environments
 
-diff -r 8e42500c130b bloodhound_multiproduct/tests/ticket/conversion.py
+diff -r bfe4d0a12be1 bloodhound_multiproduct/tests/env.py
+--- a/bloodhound_multiproduct/tests/env.py	Fri Feb 08 03:31:33 2013 -0500
++++ b/bloodhound_multiproduct/tests/env.py	Fri Feb 08 12:20:05 2013 -0500
+@@ -161,8 +161,10 @@
+     def _upgrade_mp(self, env):
+         r"""Apply multi product upgrades
+         """
++        # Do not break wiki parser ( see #373 )
+         env.disable_component(TicketModule)
+         env.disable_component(ReportModule)
++
+         self.mpsystem = MultiProductSystem(env)
+         try:
+             self.mpsystem.upgrade_environment(env.db_transaction)
+diff -r bfe4d0a12be1 bloodhound_multiproduct/tests/ticket/conversion.py
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bloodhound_multiproduct/tests/ticket/conversion.py	Thu Feb 07 03:23:00 2013 -0500
-@@ -0,0 +1,84 @@
++++ b/bloodhound_multiproduct/tests/ticket/conversion.py	Fri Feb 08 12:20:05 2013 -0500
+@@ -0,0 +1,87 @@
 +
 +#  Licensed to the Apache Software Foundation (ASF) under one
 +#  or more contributor license agreements.  See the NOTICE file
 +        self.global_env = self.env
 +        self.env = ProductEnvironment(self.global_env, self.default_product)
 +
++        # Product name inserted in RSS feed
++        self.env.product._data['name'] = 'My Project'
++
 +        self.env.config.set('trac', 'templates_dir',
 +                            os.path.join(os.path.dirname(self.env.path),
 +                                         'templates'))
 +if __name__ == '__main__':
 +    unittest.main(defaultTest='test_suite')
 +
+diff -r bfe4d0a12be1 trac/trac/web/chrome.py
+--- a/trac/trac/web/chrome.py	Fri Feb 08 03:31:33 2013 -0500
++++ b/trac/trac/web/chrome.py	Fri Feb 08 12:20:05 2013 -0500
+@@ -803,7 +803,7 @@
+     def populate_data(self, req, data):
+         d = self._default_context_data.copy()
+         d['trac'] = {
+-            'version': pkg_resources.resource_string('trac', 'TRAC_VERSION'),
++            'version': pkg_resources.resource_string('trac', 'TRAC_VERSION').strip(),
+             'homepage': 'http://trac.edgewall.org/', # FIXME: use setup data
+         }
+