Commit e7941c24 authored by Łukasz Nowak's avatar Łukasz Nowak

Switch temporarirly to superuser.

parent 64ac17e1
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
from Products.SlapOS.tests.testSlapOSMixin import testSlapOSMixin from Products.SlapOS.tests.testSlapOSMixin import testSlapOSMixin
import transaction import transaction
from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager
class TestSlapOSCorePersonRequestComputer(testSlapOSMixin): class TestSlapOSCorePersonRequestComputer(testSlapOSMixin):
...@@ -209,8 +211,13 @@ class TestSlapOSCorePersonRequestComputer(testSlapOSMixin): ...@@ -209,8 +211,13 @@ class TestSlapOSCorePersonRequestComputer(testSlapOSMixin):
# check that title is ok # check that title is ok
computer = person.restrictedTraverse(computer_url) computer = person.restrictedTraverse(computer_url)
computer2 = computer.Base_createCloneDocument(batch_mode=1) sm = getSecurityManager()
computer2.validate() try:
self.login()
computer2 = computer.Base_createCloneDocument(batch_mode=1)
computer2.validate()
finally:
setSecurityManager(sm)
self.tic() self.tic()
self.assertRaises(NotImplementedError, person.requestComputer, self.assertRaises(NotImplementedError, person.requestComputer,
......
122 123
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment