Skip to content

Commit

Permalink
[RFR] Fix test failure (ManageIQ#9731)
Browse files Browse the repository at this point in the history
* Fix webui/test_rest.py

* Fix test test_create_picture_with_role
  • Loading branch information
valaparthvi authored and spusateri committed Jan 27, 2020
1 parent f10c88e commit 439672a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion cfme/tests/configure/test_rest_access_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@ def test_delete_users_from_collection(self, users):
"User Settings",
"All VM and Instance Access Rules",
"Main Configuration",
"Red Hat Cloud",
]

FEATURES_510 = COMMON_FEATURES + [
Expand Down
3 changes: 3 additions & 0 deletions cfme/tests/infrastructure/test_config_management_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ def test_authentications_options(self, appliance):
assert_response(appliance)


# Keep this a function scoped fixture, otherwise it will fail for parametrized tests
# where one something destructive is performed on the config_manager_ob by one of the tests.
# e.g. test_config_manager_delete_rest
@pytest.fixture
def config_manager_rest(provider):
"""Creates provider using REST API."""
Expand Down
8 changes: 7 additions & 1 deletion cfme/tests/webui/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
import pytest

from cfme import test_requirements
from cfme.infrastructure.provider import InfraProvider
from cfme.markers.env_markers.provider import ONE
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.rest import delete_resources_from_collection
from cfme.utils.rest import delete_resources_from_detail


pytestmark = [test_requirements.rest]
pytestmark = [
test_requirements.rest,
pytest.mark.provider([InfraProvider], selector=ONE, scope="module"),
pytest.mark.usefixtures('setup_provider'),
]


@pytest.fixture(params=[True, False], ids=["global", "local"])
Expand Down

0 comments on commit 439672a

Please sign in to comment.