Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Made the validation tests python3 friendly.

  • Loading branch information...
commit 814fde32d9096296737cbc90c133c00b3bfde27f 1 parent ea1e8b3
Alex Gaynor authored August 15, 2012 Alex Gaynor committed August 15, 2012

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  tests/modeltests/validation/tests.py
6  tests/modeltests/validation/tests.py
@@ -79,7 +79,7 @@ def test_partial_validation(self):
79 79
             'pub_date': '2010-1-10 14:49:00'
80 80
         }
81 81
         form = ArticleForm(data)
82  
-        self.assertEqual(form.errors.keys(), [])
  82
+        self.assertEqual(list(form.errors), [])
83 83
         article = form.save(commit=False)
84 84
         article.author = self.author
85 85
         article.save()
@@ -95,7 +95,7 @@ def test_validation_with_empty_blank_field(self):
95 95
         }
96 96
         article = Article(author_id=self.author.id)
97 97
         form = ArticleForm(data, instance=article)
98  
-        self.assertEqual(form.errors.keys(), [])
  98
+        self.assertEqual(list(form.errors), [])
99 99
         self.assertNotEqual(form.instance.pub_date, None)
100 100
         article = form.save()
101 101
 
@@ -108,7 +108,7 @@ def test_validation_with_invalid_blank_field(self):
108 108
         }
109 109
         article = Article(author_id=self.author.id)
110 110
         form = ArticleForm(data, instance=article)
111  
-        self.assertEqual(form.errors.keys(), ['pub_date'])
  111
+        self.assertEqual(list(form.errors), ['pub_date'])
112 112
 
113 113
 
114 114
 class GenericIPAddressFieldTests(ValidationTestCase):

0 notes on commit 814fde3

Please sign in to comment.
Something went wrong with that request. Please try again.