Skip to content

Commit

Permalink
ci: Please pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Sep 26, 2024
1 parent ae3d988 commit 7e547c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
16 changes: 7 additions & 9 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
DOCUMENT_TEMPLATES = TEST_DOCUMENT_ROOT / "templates"
DOCUMENT_TEXT_WORK_ITEMS = "document_work_items.html.j2"
DOCUMENT_WORK_ITEMS_CROSS_PROJECT = "work_items_cross_project.html.j2"
LINK_CONFIG = converter_config.LinkConfig(
capella_attr="attribute",
polarion_role="attribute",
link_field="attribute",
reverse_field="attribute_reverse",
)


@pytest.fixture
Expand Down Expand Up @@ -135,15 +141,7 @@ def base_object(

fake = FakeModelObject("uuid1", name="Fake 1")
fake_model_type_config = converter_config.CapellaTypeConfig(
"fakeModelObject",
links=[
converter_config.LinkConfig(
capella_attr="attribute",
polarion_role="attribute",
link_field="attribute",
reverse_field="attribute_reverse",
)
],
"fakeModelObject", links=[LINK_CONFIG]
)

mc = model_converter.ModelConverter(
Expand Down
15 changes: 5 additions & 10 deletions tests/test_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

# pylint: disable-next=relative-beyond-top-level, useless-suppression
from .conftest import ( # type: ignore[import]
LINK_CONFIG,
TEST_MODEL_ELEMENTS_CONFIG,
BaseObjectContainer,
FakeModelObject,
Expand Down Expand Up @@ -176,15 +177,7 @@ def grouped_links_base_object(
dummy_work_items: dict[str, data_models.CapellaWorkItem],
) -> GroupedLinksBaseObject:
config = converter_config.CapellaTypeConfig(
"fakeModelObject",
links=[
converter_config.LinkConfig(
capella_attr="attribute",
polarion_role="attribute",
link_field="attribute",
reverse_field="attribute_reverse",
)
],
"fakeModelObject", links=[LINK_CONFIG]
)
mock_model = mock.MagicMock()
fake_2 = FakeModelObject("uuid2", "Fake 2")
Expand Down Expand Up @@ -993,6 +986,8 @@ def test_update_links(base_object: BaseObjectContainer):
type="fakeModelObject",
)
)
for data in base_object.mc.converter_session.values():
data.type_config.links[0].polarion_role = "attribute"

base_object.pw.project_client.work_items.links.get_all.side_effect = (
[link],
Expand Down Expand Up @@ -1266,7 +1261,7 @@ def test_maintain_grouped_links_attributes_with_role_prefix(

@staticmethod
def test_grouped_links_attributes_different_link_field_in_config(
base_object: BaseObjectContainer, monkeypatch: pytest.MonkeyPatch
base_object: BaseObjectContainer,
):
converter_data_1 = base_object.mc.converter_session["uuid1"]
converter_data_2 = base_object.mc.converter_session["uuid2"]
Expand Down

0 comments on commit 7e547c0

Please sign in to comment.