-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a mockup server #16
Comments
According to the discussion with Vahid and the rest of the back-end team, it is been decided to go through this task with this sequential parts:
|
This http-server in @contextlib.contextmanager
def http_server(app=None, handler_class=WSGIRequestHandler, server_class=WSGIServer, bind=('', 0)):
server = server_class(bind, handler_class)
if app:
assert isinstance(server, WSGIServer)
server.set_app(app)
thread = threading.Thread(target=server.serve_forever, name='sa-media test server.', daemon=True)
thread.start()
url = 'http://localhost:%s' % server.server_address[1]
yield server, url
server.shutdown()
thread.join() |
But there is a few things that should be mentioned here:
|
Nice, Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please provide a mockup server to serve the generate yaml files as HTTP REST api.
For example:
bddrest mockup --bind [9.9.9.9:]8090 --base-url apiv1 myfile.yml yourfile.yml *.yml
The text was updated successfully, but these errors were encountered: