Commit f2e44795 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: project needed when create person/compute node

parent 5368609f
......@@ -99,7 +99,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
self.assertTrue(login.isLoginBlocked())
def test_block_ERP5Login_without_password_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......@@ -109,7 +109,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
login_portal_type="ERP5 Login")
def test_block_CertificateLogin_without_password_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......@@ -121,7 +121,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
def test_block_CertificateLogin_without_password_on_compute_node(self):
self._test_login_donot_block(
document=self._makeComputeNode()[0],
document=self._makeComputeNode(self.addProject())[0],
login_portal_type="Certificate Login")
def test_block_CertificateLogin_without_password_on_software_instance(self):
......@@ -130,7 +130,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
login_portal_type="Certificate Login")
def test_block_GoogleLogin_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......@@ -141,7 +141,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
)
def test_block_FacebookLogin_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......@@ -203,7 +203,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
self.assertFalse(login.isPasswordExpired())
def test_expire_ERP5Login_without_password_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......@@ -212,8 +212,22 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
document=person,
login_portal_type="ERP5 Login")
<<<<<<< HEAD
=======
def test_expire_ERP5Login_without_password_on_compute_node(self):
self._test_expire_when_passoword_is_set(
document=self._makeComputeNode(self.addProject())[0],
login_portal_type="ERP5 Login"
)
def test_expire_ERP5Login_without_password_on_software_instance(self):
self._test_expire_when_passoword_is_set(
document=self._makeDummySoftwareInstance(),
login_portal_type="ERP5 Login")
>>>>>>> df93206e7 (slapos_erp5: project needed when create person/compute node)
def test_expire_CertificateLogin_without_password_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......@@ -225,7 +239,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
def test_expire_CertificateLogin_without_password_on_compute_node(self):
self._test_dont_expire_when_password_isnt_set(
document=self._makeComputeNode()[0],
document=self._makeComputeNode(self.addProject())[0],
login_portal_type="Certificate Login")
def test_expire_CertificateLogin_without_password_on_software_instance(self):
......@@ -234,7 +248,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
login_portal_type="Certificate Login")
def test_expire_GoogleLogin_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......@@ -245,7 +259,7 @@ class TestSlapOSAuthenticationPolicyL(SlapOSTestCaseMixin):
)
def test_expire_FacebookLogin_on_person(self):
person = self.makePerson(user=0)
person = self.makePerson(self.addProject(), user=0)
person.edit(
first_name="SOMENAME",
last_name="LASTNAME"
......
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