  
          for n in ['#', ' ']:
              self.assertRaises(ValueError, http.base36_to_int, n)
          for n in [123, {1: 2}, (1, 2, 3), 3.141]:
              self.assertRaises(TypeError, http.base36_to_int, n)
  
          # more explicit output testing
          for n, b36 in [(0, '0'), (1, '1'), (42, '16'), (818469960, 'django')]:
              self.assertEqual(http.int_to_base36(n), b36)
              self.assertEqual(http.base36_to_int(b36), n)
 
</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.int_to_base36, n)
 </s> add             with self.assertRaises(TypeError):
                http.int_to_base36(n) </s> remove             self.assertRaises(ValueError, http.int_to_base36, sys.maxint + 1)
 </s> add             with self.assertRaises(ValueError):
                http.int_to_base36(sys.maxint + 1) </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(TypeError, wkb_r.read, bad_wkb)
 </s> add             with self.assertRaises(TypeError):
                wkb_r.read(bad_wkb)
            with self.assertRaises(TypeError):
                http.base36_to_int(n)
  
          for n in ['#', ' ']:
              self.assertRaises(ValueError, http.base36_to_int, n)
          for n in [123, {1: 2}, (1, 2, 3), 3.141]:
            with self.assertRaises(TypeError):
                http.base36_to_int(n)
  
          # more explicit output testing
          for n, b36 in [(0, '0'), (1, '1'), (42, '16'), (818469960, 'django')]:
              self.assertEqual(http.int_to_base36(n), b36)
              self.assertEqual(http.base36_to_int(b36), 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