mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 17:32:16 +00:00
Merge pull request #252 from nottinghamtec/hotfix/register-emails
Fix special characters in registration email subject
This commit is contained in:
@@ -1,18 +1,19 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
from datetime import date, timedelta
|
||||||
|
|
||||||
|
import reversion
|
||||||
|
from django.core import mail
|
||||||
|
from django.db import transaction
|
||||||
from django.test import LiveServerTestCase
|
from django.test import LiveServerTestCase
|
||||||
from django.test.client import Client
|
from django.test.client import Client
|
||||||
from django.core import mail
|
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.webdriver.common.keys import Keys
|
|
||||||
from selenium.common.exceptions import StaleElementReferenceException, WebDriverException
|
from selenium.common.exceptions import StaleElementReferenceException, WebDriverException
|
||||||
|
from selenium.webdriver.common.keys import Keys
|
||||||
from selenium.webdriver.support.ui import WebDriverWait
|
from selenium.webdriver.support.ui import WebDriverWait
|
||||||
|
|
||||||
from RIGS import models
|
from RIGS import models
|
||||||
import re
|
|
||||||
import os
|
|
||||||
from datetime import date, timedelta
|
|
||||||
from django.db import transaction
|
|
||||||
import reversion
|
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
class UserRegistrationTest(LiveServerTestCase):
|
class UserRegistrationTest(LiveServerTestCase):
|
||||||
@@ -103,7 +104,7 @@ class UserRegistrationTest(LiveServerTestCase):
|
|||||||
# Check Email
|
# Check Email
|
||||||
self.assertEqual(len(mail.outbox), 1)
|
self.assertEqual(len(mail.outbox), 1)
|
||||||
email = mail.outbox[0]
|
email = mail.outbox[0]
|
||||||
self.assertIn('activation required', email.subject)
|
self.assertIn('John Smith "JS" activation required', email.subject)
|
||||||
urls = re.findall(
|
urls = re.findall(
|
||||||
'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', email.body)
|
'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', email.body)
|
||||||
self.assertEqual(len(urls), 1)
|
self.assertEqual(len(urls), 1)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ python-dateutil==2.4.2
|
|||||||
pytz==2015.4
|
pytz==2015.4
|
||||||
raven==5.8.1
|
raven==5.8.1
|
||||||
reportlab==3.1.44
|
reportlab==3.1.44
|
||||||
selenium==2.53.1
|
selenium==2.53.6
|
||||||
simplejson==3.7.2
|
simplejson==3.7.2
|
||||||
six==1.9.0
|
six==1.9.0
|
||||||
sqlparse==0.1.15
|
sqlparse==0.1.15
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{{ user }} activation required
|
{{ user|safe }} activation required
|
||||||
|
|||||||
Reference in New Issue
Block a user