def test_HTTPMove():
 assert_raises(AssertionError, HTTPFound)
 assert_raises(AssertionError, HTTPTemporaryRedirect, headers=[('l0cation', '/bing')])
 assert isinstance(HTTPMovedPermanently('This is a message', headers=[('Location', '/bing')]), HTTPRedirection)
 assert isinstance(HTTPUseProxy(headers=[('LOCATION', '/bing')]), HTTPRedirection)
 assert isinstance(HTTPFound('/foobar'), HTTPRedirection)

def test_HTTPMove ( ) : assert_raises ( AssertionError , HTTPFound ) assert_raises ( AssertionError , HTTPTemporaryRedirect , headers = [ ( 'l0cation' , '/bing' ) ] ) assert isinstance ( HTTPMovedPermanently ( 'This is a message' , headers = [ ( 'Location' , '/bing' ) ] ) , HTTPRedirection ) assert isinstance ( HTTPUseProxy ( headers = [ ( 'LOCATION' , '/bing' ) ] ) , HTTPRedirection ) assert isinstance ( HTTPFound ( '/foobar' ) , HTTPRedirection )
make sure that location is a mandatory attribute of redirects .