]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/tests/utils.py
tests: Use strings from fields module for error tests
[patchwork] / apps / patchwork / tests / utils.py
index f340f096e9021c6180d4856e345bec055f0e3eb3..d4708aa590fb22c673d617c12f6c040177669f98 100644 (file)
@@ -21,6 +21,7 @@ import os
 import codecs
 from patchwork.models import Project, Person
 from django.contrib.auth.models import User
+from django.forms.fields import EmailField
 
 from email import message_from_file
 try:
@@ -56,6 +57,10 @@ class defaults(object):
 +a
 """
 
+error_strings = {
+    'email': EmailField.default_error_messages['invalid'],
+}
+
 _user_idx = 1
 def create_user():
     global _user_idx