Commits

Olemis Lang  committed c7b718d

BH Multiproduct #667 : Test case is about anonymous access rather than 'user'

  • Participants
  • Parent commits 9b7f9d5
  • Branches t667_error_mainnav

Comments (0)

Files changed (1)

File t667/t667_r1526822_error_mainnav.tests.diff

 # HG changeset patch
-# Parent 3fa75fea0997e4f0d3592120020134a168841164
+# Parent 00d0185f13ea8c9a9ae4d2a643a081a8473d4f0b
 BH Multiproduct #667 : Test case for mainnav error
 
-diff -r 3fa75fea0997 bloodhound_multiproduct/tests/functional/admin.py
+diff -r 00d0185f13ea bloodhound_multiproduct/tests/functional/admin.py
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/bloodhound_multiproduct/tests/functional/admin.py	Tue Oct 01 19:00:41 2013 -0500
-@@ -0,0 +1,62 @@
++++ b/bloodhound_multiproduct/tests/functional/admin.py	Tue Oct 01 21:21:35 2013 -0500
+@@ -0,0 +1,69 @@
 +# -*- coding: utf-8 -*-
 +#
 +#  Licensed to the Apache Software Foundation (ASF) under one
 +        tester = self._tester
 +        prefix = tester.create_product()
 +
-+        # Revoke all actions for 'user'
++        # Revoke all permissions for 'anonymous'
 +        for action in actions:
-+            self._testenv._tracadmin('permission', 'remove', 'user', action,
-+                                     product=prefix)
-+        with tester.as_user('user'):
++            try:
++                self._testenv._tracadmin('permission', 'remove', 'anonymous', 
++                                         action, product=prefix)
++            except Exception, exc:
++                # ... but do not fail if permission is not granted to user
++                if exc.__class__ is Exception:
++                    pass
++                else:
++                    raise
++        with tester.as_user(None):
 +            self.go_to_home()
 +
 +