def test_gateway_ready(self): p = set_gateway_parser().parse_args([]) with RESTGatewayPea(p): a = requests.get(f'http://0.0.0.0:{p.port_expose}/ready') self.assertEqual(a.status_code, 200) with RESTGatewayPea(p): a = requests.post(f'http://0.0.0.0:{p.port_expose}/api/ass') self.assertEqual(a.status_code, 405)
def test_gateway_ready(): p = set_gateway_parser().parse_args([]) with RESTGatewayPea(p): a = requests.get(f'http://0.0.0.0:{p.port_expose}/ready') assert a.status_code == 200 with RESTGatewayPea(p): a = requests.post(f'http://0.0.0.0:{p.port_expose}/api/ass') assert a.status_code == 405
def test_gateway_ready(port_expose, route, status_code): p = set_gateway_parser().parse_args(['--port-expose', str(port_expose)]) with RESTGatewayPea(p): a = requests.get(f'http://0.0.0.0:{p.port_expose}{route}') assert a.status_code == status_code