Commit 9157ad21 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: testSlapOSWebSkins, use person.getUserId instead person.getReference

parent ae610908
......@@ -89,8 +89,8 @@ class SlapOSWebMixin(testSlapOSMixin, SecurityTestCase):
sr.immediateReindexObject()
sr.updateLocalRolesOnSecurityGroups()
if validate:
self.assertUserCanAccessDocument(person.getReference(), sr)
self.assertUserCanViewDocument(person.getReference(), sr)
self.assertUserCanAccessDocument(person.getUserId(), sr)
self.assertUserCanViewDocument(person.getUserId(), sr)
return sr
......@@ -101,8 +101,8 @@ class SlapOSWebMixin(testSlapOSMixin, SecurityTestCase):
ud.immediateReindexObject()
ud.updateLocalRolesOnSecurityGroups()
# This seems odd, user can see draft SR even he is auditor
self.assertUserCanAccessDocument(person.getReference(), ud)
self.assertUserCanViewDocument(person.getReference(), ud)
self.assertUserCanAccessDocument(person.getUserId(), ud)
self.assertUserCanViewDocument(person.getUserId(), ud)
if computer is not None:
line = ud.newContent(
......@@ -122,8 +122,8 @@ class SlapOSWebMixin(testSlapOSMixin, SecurityTestCase):
rr.immediateReindexObject()
rr.updateLocalRolesOnSecurityGroups()
if validate:
self.assertUserCanAccessDocument(person.getReference(), rr)
self.assertUserCanViewDocument(person.getReference(), rr)
self.assertUserCanAccessDocument(person.getUserId(), rr)
self.assertUserCanViewDocument(person.getUserId(), rr)
return rr
......@@ -198,7 +198,7 @@ class TestSlapOSWebSkin(SlapOSWebMixin):
def afterSetUp(self):
super(TestSlapOSWebSkin, self).afterSetUp()
self.login(self.person.getReference())
self.login(self.person.getUserId())
self.changeSkin("Hosting")
def test_WebSection_getUserTicketList(self):
......@@ -241,7 +241,7 @@ class TestSlapOSRSSSkin(SlapOSWebMixin):
def afterSetUp(self):
super(TestSlapOSRSSSkin, self).afterSetUp()
self.login(self.person.getReference())
self.login(self.person.getUserId())
self.changeSkin("RSS")
def test_WebSection_getUserTicketList(self):
......@@ -333,5 +333,3 @@ class TestSlapOSRSSSkin(SlapOSWebMixin):
def test_Base_getOpenRelatedTicketList_hosting_subscription(self):
""" Test Base_getOpenRelatedTicketList with Hosting Subscriptions on RSS """
self._test_Base_getOpenRelatedTicketList_hosting_subscription()
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