-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] service dialog regex validation #10038
[1LP][RFR] service dialog regex validation #10038
Conversation
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.
Since the only thing you are changing between and the two element_data
's is the validation field, I think we could clean this up a bit. Consider the following example:
@pytest.fixture
def my_fixture(request):
element_data = {"a": 1, "b": 2, "c": request.param["c"]}
yield element_data
@pytest.mark.parametrize("my_fixture", [{"c": "blah-blah-blah"}, {"c": "hehehehe"}], indirect=True)
def test_blah(my_fixture):
print(my_fixture)
Which, when run yields:
test_groups.py::test_blah[my_fixture0] PASSED [ 50%]{'a': 1, 'b': 2, 'c': 'blah-blah-blah'}
test_groups.py::test_blah[my_fixture1] PASSED [100%]{'a': 1, 'b': 2, 'c': 'hehehehe'}
I think we can do something similar here that will avoid the lengthy parametrization on each test case.
db450e2
to
43bc561
Compare
I detected some fixture changes in commit 43bc561 The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
@john-dupuy All changes are done, please review PR |
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.
Awesome 👍
Purpose or Intent
Adding test to check is validation regex text filter working or not
PRT Run
{{pytest: cfme/tests/services/test_dialog_regex_validation_in_catalog.py::test_dialog_regex_validation_button cfme/tests/services/test_dialog_regex_validation_in_catalog.py::test_dialog_element_regex_validation --long-running -v}}