-
Notifications
You must be signed in to change notification settings - Fork 9
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 ForemanApi #175
base: master
Are you sure you want to change the base?
add ForemanApi #175
Conversation
632806f
to
702af13
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #175 +/- ##
==========================================
+ Coverage 90.86% 91.03% +0.17%
==========================================
Files 9 10 +1
Lines 449 558 +109
==========================================
+ Hits 408 508 +100
- Misses 41 50 +9 ☔ View full report in Codecov by Sentry. |
09cadae
to
68a401d
Compare
42cd422
to
81437b1
Compare
8c7491a
to
3208cea
Compare
20c4a7d
to
410b8c5
Compare
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.
Partial review, but the train just arrived
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.
I think my comments are mostly stylistic and overall 👍
Have you thought about documentation? I think we need to add it to https://github.com/Apipie/apypie/blob/master/docs/api.rst for it to be picked up.
|
||
|
||
@pytest.fixture | ||
def foremanapi(fixture_dir, requests_mock, tmpdir): |
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.
Nit: foreman_api
?
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.
Nope :/
Lines 44 to 49 in c77abe1
@pytest.fixture | |
def foreman_api(fixture_dir, requests_mock, tmpdir): | |
with fixture_dir.join('foreman.json').open() as read_file: | |
data = json.load(read_file) | |
requests_mock.get('https://foreman.example.com/apidoc/v2.json', json=data) | |
return apypie.Api(uri='https://foreman.example.com', api_version=2, apidoc_cache_dir=tmpdir.strpath) |
|
||
|
||
@pytest.fixture | ||
def lunaapi(fixture_dir, requests_mock, tmpdir): |
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.
Nit: luna_api
?
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.
Nope :/
Lines 52 to 57 in c77abe1
@pytest.fixture | |
def luna_api(fixture_dir, requests_mock, tmpdir): | |
with fixture_dir.join('luna.json').open() as read_file: | |
data = json.load(read_file) | |
requests_mock.get('https://foreman.example.com/apidoc/v2.json', json=data) | |
return apypie.Api(uri='https://foreman.example.com', api_version=2, apidoc_cache_dir=tmpdir.strpath) |
d4b8108
to
a584731
Compare
applied your suggestions and added to docs (we don't have docs-build in CI, 😱) |
No description provided.