Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

redixin
Copy link

@redixin redixin commented Dec 21, 2016

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.02%) to 90.889% when pulling 993a258 on fake-client-tests into f707005 on add-security-raml-and-fake-impl.

Copy link
Member

@boris-42 boris-42 left a 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,
Copy link
Member

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
Copy link
Member

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)$")
Copy link
Member

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 =)

Copy link
Author

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
Copy link
Member

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?

@redixin redixin changed the base branch from add-security-raml-and-fake-impl to master December 27, 2016 19:49
@redixin redixin changed the title Implement and use fake clients [WIP] Implement and use fake clients Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants