def test_permanent():
 with pytest.raises(falcon.http_status.HTTPStatus) as redirect:
  hug.redirect.permanent('/')
 assert ('301' in redirect.value.status)

def test_permanent ( ) : with pytest . raises ( falcon . http_status . HTTPStatus ) as redirect : hug . redirect . permanent ( '/' ) assert ( '301' in redirect . value . status )
test to ensure function causes a redirect with http 301 status code .