Olemis Lang avatar Olemis Lang committed e065b27

BH Multiproduct #355 : ProductEnvironment.is_component_enabled logic fully tested

Comments (0)

Files changed (1)

t355/t355_r1442601_trac_test_env_cmp_enabled.diff

 
 diff -r 25f5af82c0ce bloodhound_multiproduct/multiproduct/config.py
 --- a/bloodhound_multiproduct/multiproduct/config.py	Thu Feb 07 14:50:28 2013 +0000
-+++ b/bloodhound_multiproduct/multiproduct/config.py	Fri Feb 08 03:21:30 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/config.py	Fri Feb 08 03:31:33 2013 -0500
 @@ -298,7 +298,7 @@
                  setting.delete()
              else:
      # Helper methods
 diff -r 25f5af82c0ce bloodhound_multiproduct/multiproduct/dbcursor.py
 --- a/bloodhound_multiproduct/multiproduct/dbcursor.py	Thu Feb 07 14:50:28 2013 +0000
-+++ b/bloodhound_multiproduct/multiproduct/dbcursor.py	Fri Feb 08 03:21:30 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/dbcursor.py	Fri Feb 08 03:31:33 2013 -0500
 @@ -65,6 +65,8 @@
                                                                   TRANSLATE_TABLES,
                                                                   PRODUCT_COLUMN,
      def execute(self, sql, args=None):
 diff -r 25f5af82c0ce bloodhound_multiproduct/multiproduct/env.py
 --- a/bloodhound_multiproduct/multiproduct/env.py	Thu Feb 07 14:50:28 2013 +0000
-+++ b/bloodhound_multiproduct/multiproduct/env.py	Fri Feb 08 03:21:30 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/env.py	Fri Feb 08 03:31:33 2013 -0500
 @@ -117,6 +117,42 @@
          except OperationalError:
              pass
  
 diff -r 25f5af82c0ce bloodhound_multiproduct/tests/config.py
 --- a/bloodhound_multiproduct/tests/config.py	Thu Feb 07 14:50:28 2013 +0000
-+++ b/bloodhound_multiproduct/tests/config.py	Fri Feb 08 03:21:30 2013 -0500
++++ b/bloodhound_multiproduct/tests/config.py	Fri Feb 08 03:31:33 2013 -0500
 @@ -188,6 +188,12 @@
              self.assertEquals(u"Voilà l'été", config2.get('a', 'option2'))
          self._test_with_inherit(testcb)
      return unittest.makeSuite(ProductConfigTestCase,'test')
 diff -r 25f5af82c0ce bloodhound_multiproduct/tests/env.py
 --- a/bloodhound_multiproduct/tests/env.py	Thu Feb 07 14:50:28 2013 +0000
-+++ b/bloodhound_multiproduct/tests/env.py	Fri Feb 08 03:21:30 2013 -0500
++++ b/bloodhound_multiproduct/tests/env.py	Fri Feb 08 03:31:33 2013 -0500
 @@ -38,6 +38,8 @@
  from trac.env import Environment
  from trac.test import EnvironmentStub
          self.env = None
          self.product_env = None
  
-@@ -303,53 +314,99 @@
+@@ -303,53 +314,102 @@
  
          global_env = self.env
          product_env = self.product_env
 +        # Test the rules against custom , external component
 +        _test_component_enabled(C)
 +
-+        # Test the rules against Trac component class
++        for env in (global_env, product_env):
++            env.config.remove('components', env._component_name(C))
++
++         # Test the rules against Trac component class
 +        _test_component_enabled(TicketModule)
  
      def test_path(self):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.