Commits

James Bennett committed 479789e

Add a test for a backend module which exists but lacks the specified class.

  • Participants
  • Parent commits 0743cf0

Comments (0)

Files changed (1)

registration/tests/backends.py

         settings.REGISTRATION_BACKEND = 'registration.backends.doesnotexist.NonExistentBackend'
         self.assertRaises(ImproperlyConfigured, get_backend)
 
+    def test_backend_attribute_error(self):
+        """
+        Test that a backend module which exists but does not have a
+        class of the specified name raises the correct exception.
+        
+        """
+        settings.REGISTRATION_BACKEND = 'registration.backends.default.NonexistentBackend'
+        self.assertRaises(ImproperlyConfigured, get_backend)
+
 
 class DefaultRegistrationBackendTests(TestCase):
     """