          self.user1 = User.objects.create_user('test', 'test@example.com', 'test')
  
      @override_settings(AUTHENTICATION_BACKENDS=[backend])
      def test_type_error_raised(self):
          self.assertRaises(TypeError, authenticate, username='test', password='test')
  
  
  class ImproperlyConfiguredUserModelTest(TestCase):
      """
      Tests that an exception from within get_user_model is propagated and doesn't
 
</s> remove         self.assertRaises(ImproperlyConfigured, self.user.has_perm, ('perm', TestObj(),))
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.user.has_perm(('perm', TestObj())) </s> remove         self.assertRaises(InvalidPage, paginator.page, 3)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, None)
        self.assertRaises(PageNotAnInteger, paginator.validate_number, 'x')
 </s> add         with self.assertRaises(InvalidPage):
            paginator.page(3)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number(None)
        with self.assertRaises(PageNotAnInteger):
            paginator.validate_number('x') </s> remove         self.assertRaises(BadHeaderError, r.__setitem__, 'test\rstr', 'test')
        self.assertRaises(BadHeaderError, r.__setitem__, 'test\nstr', 'test')
 </s> add         with self.assertRaises(BadHeaderError):
            r.__setitem__('test\rstr', 'test')
        with self.assertRaises(BadHeaderError):
            r.__setitem__('test\nstr', 'test') </s> remove         self.assertRaises(ImproperlyConfigured,
                          self.client.get,
                          '/syndication/articles/')
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.client.get('/syndication/articles/') </s> remove         self.assertRaises(TypeError, build_abc)
 </s> add         with self.assertRaises(TypeError):
            build_abc()
        with self.assertRaises(TypeError):
            authenticate(username='test', password='test')
          self.user1 = User.objects.create_user('test', 'test@example.com', 'test')
  
      @override_settings(AUTHENTICATION_BACKENDS=[backend])
      def test_type_error_raised(self):
        with self.assertRaises(TypeError):
            authenticate(username='test', password='test')
  
  
  class ImproperlyConfiguredUserModelTest(TestCase):
      """
      Tests that an exception from within get_user_model is propagated and doesn't
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/auth_tests/test_auth_backends.py