-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add a basic mock to handle the requests to the server #282
Conversation
c75e0b6
to
fad9958
Compare
fad9958
to
8b88e71
Compare
…es has been added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#response = self._load_response("events_stateful.json") | ||
self._set_headers(code=200) # If an response is given, add the size of the response. | ||
elif self.path == "/api/v1/events/stateless": | ||
#response = self._load_response("events_stateless.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this commented out code necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since these endpoints publish information, for the moment it only returns code=200, in case a response is included this line must be uncommented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…sent response. Predefined responses were moved to a template file.
Description
This PR adds a mock of the server, which supports both HTTP and HTTPS protocols. The mock server provides predefined responses to specific API endpoints, including JWT token generation for authentication, file serving, and custom JSON responses. This setup is useful for local testing and simulating interactions with various API endpoints.