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

Feature absolute urls in tests, override command line URL #53

Merged
merged 2 commits into from
Jun 6, 2015
Merged

Feature absolute urls in tests, override command line URL #53

merged 2 commits into from
Jun 6, 2015

Conversation

Kesmy
Copy link
Contributor

@Kesmy Kesmy commented Jun 3, 2015

Minor addition of a command-line argument (--absolute-urls) which
discards the base URL provided on the command line and treats
the "url" in test cases as an Absolute/Full URL.

Default test:

- test:
    - group: "Smoketest"
    - name: "API Root"
    - url: "/users/octocat"
    - expected_status: [200]

Test using --absolute-urls:

- test:
    - group: "Smoketest"
    - name: "API Root"
    - url: "http://api.github.com/users/octocat"
    - expected_status: [200]

Kesmy added 2 commits June 3, 2015 12:57
Adds an argument (--absolute-urls) to treat URLs as Absolute URLs
instead of Relative URLs
Minor code formatting changes
@Kesmy
Copy link
Contributor Author

Kesmy commented Jun 3, 2015

This feature is something I added locally for my own use.

I'm working with an API that returns full URLs in responses, and I wanted to use them directly, without any additional parsing, in future tests.

resttest.py still requires a URL parameter, this switch simply changes it to an empty string before building/running tests.

@svanoort
Copy link
Owner

svanoort commented Jun 6, 2015

Looking good, and cleans up a few dangling style points!

svanoort added a commit that referenced this pull request Jun 6, 2015
@svanoort svanoort merged commit 4da15d3 into svanoort:master Jun 6, 2015
@Kesmy Kesmy deleted the feature-absolute-urls branch June 8, 2015 03:55
@svanoort svanoort changed the title Feature absolute urls Feature absolute urls in tests, override command line URL Oct 3, 2015
@svanoort svanoort added this to the Release 1.5.0 milestone Oct 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants