          user = User.objects.create_user('ima1337h4x0r', 'test4@example.com', 'p4ssw0rd')
          p0 = PasswordResetTokenGenerator()
  
          # This will put a 14-digit base36 timestamp into the token, which is too large.
          self.assertRaises(ValueError,
                            p0._make_token_with_timestamp,
                            user, 175455491841851871349)
 
</s> remove         self.assertRaises(
            ItalianRestaurant.DoesNotExist,
            lambda: Place.objects.get(name="Demon Dogs").restaurant.italianrestaurant
        )
 </s> add         with self.assertRaises(ItalianRestaurant.DoesNotExist):
            Place.objects.get(name="Demon Dogs").restaurant.italianrestaurant </s> remove         self.assertRaises(
            Restaurant.DoesNotExist, lambda: p.restaurant
        )
 </s> add         with self.assertRaises(Restaurant.DoesNotExist):
            p.restaurant </s> remove         self.assertRaises(ImproperlyConfigured, self.backend)
 </s> add         with self.assertRaises(ImproperlyConfigured):
            self.backend() </s> remove         self.assertRaises(InvalidSessionKey,
                          self.backend()._key_to_file, "a\\b\\c")
 </s> add         with self.assertRaises(InvalidSessionKey):
            self.backend()._key_to_file("a\\b\\c") </s> remove         self.assertRaises(FieldError, test_gmbh.save)
 </s> add         with self.assertRaises(FieldError):
            test_gmbh.save()
        with self.assertRaises(ValueError):
            p0._make_token_with_timestamp(user, 175455491841851871349)
          user = User.objects.create_user('ima1337h4x0r', 'test4@example.com', 'p4ssw0rd')
          p0 = PasswordResetTokenGenerator()
  
          # This will put a 14-digit base36 timestamp into the token, which is too large.
        with self.assertRaises(ValueError):
            p0._make_token_with_timestamp(user, 175455491841851871349)
        with self.assertRaises(ValueError):
            p0._make_token_with_timestamp(user, 175455491841851871349)
        with self.assertRaises(ValueError):
            p0._make_token_with_timestamp(user, 175455491841851871349)
keep keep keep keep replace replace replace
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/auth_tests/test_tokens.py