Commit a070a805 authored by Rafael Monnerat's avatar Rafael Monnerat 👻

slapos_cloud (test only): Email should be ascii compatible, according to RFC

parent d48a6a67
......@@ -108,7 +108,10 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self.assertTrue(expected_message in credential_request_form,
'%s not in %s' % (expected_message, credential_request_form))
email = '%s@example.com' % reference
# According to email address RFC you should be 'ascii' compatible
# for email specificiations.
# reference: https://en.wikipedia.org/wiki/Email_address#Local-part
email = 'joe%s@example.com' % self.generateNewAsciiId()
redirect_url = self.web_site.slapos_master_panel.hateoas.connection.WebSection_newCredentialRequest(
reference=reference,
......
......@@ -275,7 +275,11 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
person_user.edit(
title="live_test_%s" % new_id,
reference="live_test_%s" % new_id,
default_email_text="live_test_%s@example.org" % new_id,
# According to email address RFC you should be 'ascii' compatible
# for email specificiations.
# reference: https://en.wikipedia.org/wiki/Email_address#Local-part
default_email_text="live_test_%s@example.org" % \
self.generateNewAsciiId(),
)
person_user.validate()
......@@ -1044,6 +1048,10 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self.portal.REQUEST['request_instance'] = None
self.portal.REQUEST.headers = {}
def generateNewAsciiId(self):
return "%s" % self.portal.portal_ids.generateNewId(
id_group=('slapos_core_test'))
def generateNewId(self):
return "%sö" % self.portal.portal_ids.generateNewId(
id_group=('slapos_core_test'))
......
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