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

Initial work to increase coverage on robottelo.cli module #4707

Merged
merged 1 commit into from
May 22, 2017

Conversation

rochacbruno
Copy link
Contributor

@rochacbruno rochacbruno commented May 19, 2017

using pytest parametrize and pytest-mock
added some tests to assert the call of cli methods
more tests will be added later

NOTE: Using pytest style for robottelo tests, while for tests/forreman we keep using unittest for compatibility with Junit reports and subTest. For tests/robottelo we can use pytest or even mix it with unittest.

using pytest parametrize and pytest-mock
added some tests to assert the call of cli methods
more tests will be added later
@mention-bot
Copy link

@rochacbruno, thanks for your PR! By analyzing the history of the files in this pull request, we identified @renzon, @rplevka and @sghai to be potential reviewers.

@rochacbruno rochacbruno added review enhancement An addition to the robottelo framework labels May 19, 2017
@rochacbruno rochacbruno self-assigned this May 19, 2017
@@ -566,7 +566,7 @@ def configure_puppet_test():
puppet_env.location.append(loc)
puppet_env.organization.append(org)
puppet_env = puppet_env.update(['location', 'organization'])
Proxy.importclasses({
Proxy.import_classes({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed this method to keep the standard with all other method names. (grepped and renamed all references)

@@ -33,7 +33,7 @@ def _csv_reader(output):
data = data.encode('utf8')
handler = StringIO(data)

for row in csv.reader(handler):
for row in csv.reader(handler): # pragma: no cover
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added no cover here because it is difficult to merge coverage reports for python 2 and 3 in final report

@@ -367,6 +367,8 @@ def test_parse_info(self):
' Repo ID: 10',
' 2) Repo Name: repo2',
' Repo ID: 20',
' 3) Repo Name => repo3',
' Repo ID => 30',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

included => to test this alternative format and hit the parser.

@codecov
Copy link

codecov bot commented May 19, 2017

Codecov Report

Merging #4707 into master will increase coverage by 0.98%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4707      +/-   ##
==========================================
+ Coverage   40.48%   41.47%   +0.98%     
==========================================
  Files          89       89              
  Lines        7121     7113       -8     
==========================================
+ Hits         2883     2950      +67     
+ Misses       4238     4163      -75
Impacted Files Coverage Δ
robottelo/cli/hammer.py 100% <ø> (+3.84%) ⬆️
robottelo/api/utils.py 12.36% <0%> (ø) ⬆️
robottelo/cli/proxy.py 100% <100%> (+30.76%) ⬆️
robottelo/cli/subscription.py 100% <0%> (+40.9%) ⬆️
robottelo/cli/org.py 100% <0%> (+47.61%) ⬆️
robottelo/cli/repository.py 100% <0%> (+54.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aa3295...1df4aaf. Read the comment docs.

Copy link
Contributor

@ldjebran ldjebran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Copy link
Contributor

@oshtaier oshtaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Copy link
Contributor

@abalakh abalakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@abalakh abalakh merged commit d4a24d9 into SatelliteQE:master May 22, 2017
@abalakh abalakh removed the review label May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An addition to the robottelo framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants