  
          # bad input
          self.assertRaises(ValueError, http.int_to_base36, -1)
          if six.PY2:
              self.assertRaises(ValueError, http.int_to_base36, sys.maxint + 1)
          for n in ['1', 'foo', {1: 2}, (1, 2, 3), 3.141]:
              self.assertRaises(TypeError, http.int_to_base36, n)
  
          for n in ['#', ' ']:
              self.assertRaises(ValueError, http.base36_to_int, n)
 
</s> remove             self.assertRaises(TypeError, http.int_to_base36, n)
 </s> add             with self.assertRaises(TypeError):
                http.int_to_base36(n) </s> remove         self.assertRaises(ValueError, http.int_to_base36, -1)
 </s> add         with self.assertRaises(ValueError):
            http.int_to_base36(-1) </s> remove             self.assertRaises(ValueError, http.base36_to_int, n)
 </s> add             with self.assertRaises(ValueError):
                http.base36_to_int(n) </s> remove             self.assertRaises(TypeError, http.base36_to_int, n)
 </s> add             with self.assertRaises(TypeError):
                http.base36_to_int(n) </s> remove                         self.assertRaises(ValueError, setfcn, ul, i, j, k, sliceLen + 1)
 </s> add                         with self.assertRaises(ValueError):
                            setfcn(ul, i, j, k, sliceLen + 1)
            with self.assertRaises(ValueError):
                http.int_to_base36(sys.maxint + 1)
  
          # bad input
          self.assertRaises(ValueError, http.int_to_base36, -1)
          if six.PY2:
            with self.assertRaises(ValueError):
                http.int_to_base36(sys.maxint + 1)
          for n in ['1', 'foo', {1: 2}, (1, 2, 3), 3.141]:
              self.assertRaises(TypeError, http.int_to_base36, n)
  
          for n in ['#', ' ']:
              self.assertRaises(ValueError, http.base36_to_int, n)
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/utils_tests/test_http.py