]>
git.immae.eu Git - github/fretlink/ansible-kong-app.git/blob - tests/kong.py
32bafb2027906fcc734ee979901c29e0d108ab1c
3 from http
.server
import HTTPServer
, CGIHTTPRequestHandler
5 class SimpleHTTPRequestHandler(CGIHTTPRequestHandler
):
7 if self
.path
== '/services/test':
8 self
.send_response(404)
10 self
.send_response(200)
11 self
.send_header('Content-Type', 'application/json')
13 self
.wfile
.write(b
'{ "data": [] }')
16 self
.send_response(200)
18 self
.wfile
.write(b
'Hello, world!')
21 httpd
= HTTPServer(('127.0.0.1', 8000), SimpleHTTPRequestHandler
)