Permalink
Browse files

Removed djangoforms from common testutils

  • Loading branch information...
1 parent e9371f7 commit f829ac1efe07a4228af72ef5f0331ac7f255fa73 @kumar303 kumar303 committed Jan 22, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 common/testutil.py
View
@@ -1,21 +1,21 @@
"""Common test suite utilities."""
-from django import forms as djangoforms
+import django.forms
class FormTestCaseHelper(object):
"""Mixin for unittest.TestCase descendants to aid in testing forms."""
-
+
def assertNoFormErrors(self, response):
if response.context is None:
return
- # if all went well the request probably redirected,
+ # if all went well the request probably redirected,
# otherwise, there will be form objects with errors:
forms = []
for ctx in response.context:
for cdict in ctx:
for v in cdict.values():
- if isinstance(v, djangoforms.BaseForm):
+ if isinstance(v, django.forms.BaseForm):
forms.append(v)
for form in forms:
- self.assertEquals(form.errors.as_text(), "")
+ self.assertEquals(form.errors.as_text(), "")

0 comments on commit f829ac1

Please sign in to comment.