You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/07/16 08:28:39 UTC

svn commit: r1503569 - /bloodhound/trunk/bloodhound_multiproduct/tests/web_ui.py

Author: rjollos
Date: Tue Jul 16 06:28:39 2013
New Revision: 1503569

URL: http://svn.apache.org/r1503569
Log:
Fixed unit test failure after [1495037]. Refs #561.

Check for existence of warning message and combined two test cases that were both checking for behavior when a product doesn't exist.

Modified:
    bloodhound/trunk/bloodhound_multiproduct/tests/web_ui.py

Modified: bloodhound/trunk/bloodhound_multiproduct/tests/web_ui.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/tests/web_ui.py?rev=1503569&r1=1503568&r2=1503569&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/tests/web_ui.py (original)
+++ bloodhound/trunk/bloodhound_multiproduct/tests/web_ui.py Tue Jul 16 06:28:39 2013
@@ -148,23 +148,6 @@ class ProductModuleTestCase(RequestHandl
                          "Unexpected product prefix")
         self.assertEqual(self.expectedPathInfo, req.args['pathinfo'],
                          "Unexpected sub path")
- 
-    def test_product_pathinfo_warning(self):
-        spy = self.global_env[TestRequestSpy]
-        self.assertIsNot(None, spy)
-
-        req = self._get_request_obj(self.global_env)
-        req.authname = 'testuser'
-        req.environ['PATH_INFO'] = '/products/PREFIX/some/path'
-        self.expectedPrefix = 'PREFIX'
-        self.expectedPathInfo = '/some/path'
-        spy.testProcessing = lambda *args, **kwargs: None
-
-        with self.assertRaises(HTTPNotFound) as test_cm:
-            self._dispatch(req, self.global_env)
-
-        self.assertEqual('Unable to render product page. Wrong setup ?',
-                         test_cm.exception.detail)
 
     def test_product_list(self):
         spy = self.global_env[TestRequestSpy]
@@ -269,6 +252,9 @@ class ProductModuleTestCase(RequestHandl
         self.expectedPathInfo = ''
         with self.assertRaises(RequestDone):
             self._dispatch(req, self.global_env)
+        self.assertEqual(1, len(req.chrome['warnings']))
+        self.assertEqual('Product missing not found',
+                         req.chrome['warnings'][0].unescape())
 
     def test_product_edit(self):
         spy = self.global_env[TestRequestSpy]