-
Notifications
You must be signed in to change notification settings - Fork 1
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
[WIP] Implement and use fake clients #61
base: master
Are you sure you want to change the base?
Conversation
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.
have some questions
from ceagle.api_fake_data import fake_security | ||
from ceagle.api_fake_data import health | ||
from ceagle import config | ||
|
||
FAKE_CLIENT_MAP = { | ||
"security": fake_security.Client, |
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.
Maybe we should unify this as well and call it "security.Client"
from ceagle import config | ||
|
||
bp = flask.Blueprint("regions", __name__) | ||
|
||
|
||
@bp.route("", defaults={"detailed": False}) | ||
@bp.route("/detailed", defaults={"detailed": True}) | ||
@fake_regions.get_regions |
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.
why you are removing this?
|
||
class Client(base.FakeClient): | ||
|
||
@base.route("/api/v1/availability/(?P<period>day|week|month)$") |
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.
didn't know about this syntax for period =)
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.
This is not flask syntax, this is a raw regular expression
|
||
@base.route("/api/v1/availability/(?P<period>day|week|month)$") | ||
def availability(self, query, period): | ||
return {"availability": {}}, 200 |
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.
why it returns empty results?
993a258
to
ca7dab8
Compare
ca7dab8
to
8f489cd
Compare
No description provided.