@@ -0,0 +1,1178 @@
+# -*- coding: utf-8 -*-%0A%0Afrom __future__ import unicode_literals%0A%0Afrom usersettings.shortcuts import get_current_usersettings%0A%0Afrom django_webtest import WebTest%0Afrom django.core.urlresolvers import reverse%0A%0Afrom .settings import SettingsMixin%0A%0A%0Aclass SettingsTests(SettingsMixin, WebTest):%0A%0A    def test_signup_allowed(self):%0A        settings_url = reverse(%0A            'account_signup',%0A        )%0A        response = self.app.get(%0A            settings_url,%0A            expect_errors=True%0A        )%0A        self.assertEqual(response.status_code, 200)%0A        self.assertContains(response, 'Password (again)')%0A        self.assertNotContains(response, 'Sign Up Closed')%0A%0A    def test_signup_disabled(self):%0A        user_settings = get_current_usersettings()%0A        user_settings.NEW_ACCOUNTS_ALLOWED = False;%0A        user_settings.save()%0A        settings_url = reverse(%0A            'account_signup',%0A        )%0A        response = self.app.get(%0A            settings_url,%0A            expect_errors=True%0A        )%0A        self.assertEqual(response.status_code, 200)%0A        self.assertContains(response, 'Sign Up Closed')%0A        self.assertNotContains(response, 'Password (again)')%0A

Test to check switching off user signup