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