Permalink
Browse files

Merge pull request #53 from Narsil/master

account/tests.py used to pollute settings, preventing other app tests to function correctly.
  • Loading branch information...
pennersr committed Apr 5, 2012
2 parents b5bd149 + 2ccef98 commit 72abc1dc0e51ec1825ed862e46ce9d98cc74719d
Showing with 7 additions and 0 deletions.
  1. +7 −0 allauth/account/tests.py
View
@@ -14,6 +14,9 @@
class AccountTests(TestCase):
def setUp(self):
+ self.OLD_EMAIL_VERIFICATION = app_settings.EMAIL_VERIFICATION
+ self.OLD_EMAIL_AUTHENTICATION = app_settings.EMAIL_AUTHENTICATION
+ self.OLD_EMAIL_SIGNUP_FORM_CLASS = app_settings.SIGNUP_FORM_CLASS
app_settings.EMAIL_VERIFICATION = True
app_settings.EMAIL_AUTHENTICATION = False
app_settings.SIGNUP_FORM_CLASS = None
@@ -72,3 +75,7 @@ def x_test_email_escaping(self):
email='foo@bar.com')
EmailAddress.objects.add_email(u, u.email)
+ def tearDown(self):
+ self.EMAIL_VERIFICATION = app_settings.OLD_EMAIL_VERIFICATION
+ self.EMAIL_AUTHENTICATION = app_settings.OLD_EMAIL_AUTHENTICATION
+ self.EMAIL_SIGNUP_FORM_CLASS = app_settings.OLD_SIGNUP_FORM_CLASS

0 comments on commit 72abc1d

Please sign in to comment.