Skip to content

Commit

Permalink
Tests should now assert on Product from execution.build
Browse files Browse the repository at this point in the history
after latest changes in Kiwi TCMS, see:
kiwitcms/Kiwi@48a33a7
kiwitcms/Kiwi#3439
  • Loading branch information
atodorov committed Jan 13, 2024
1 parent 17f4684 commit f518cf1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions trackers_integration/tests/test_mantis.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _fixture_setup(self):
self.execution_1.run.save()

self.component = ComponentFactory(
name="Mantis integration", product=self.execution_1.run.plan.product
name="Mantis integration", product=self.execution_1.build.version.product
)
self.execution_1.case.add_component(self.component)

Expand Down Expand Up @@ -143,7 +143,7 @@ def test_report_issue_from_test_execution_1click_works(self):
for expected_string in [
f"Filed from execution {self.execution_1.get_full_url()}",
"Reporter",
self.execution_1.run.plan.product.name,
self.execution_1.build.version.product.name,
self.component.name,
"Steps to reproduce",
self.execution_1.case.text,
Expand Down
14 changes: 7 additions & 7 deletions trackers_integration/tests/test_openproject.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2023 Alexander Todorov <atodorov@MrSenko.com>
# Copyright (c) 2022-2024 Alexander Todorov <atodorov@MrSenko.com>
#
# Licensed under the GPL 3.0: https://www.gnu.org/licenses/gpl-3.0.txt
#
Expand Down Expand Up @@ -37,7 +37,7 @@ def _fixture_setup(self):
self.execution_1.run.save()

self.component = ComponentFactory(
name="OpenProject integration", product=self.execution_1.run.plan.product
name="OpenProject integration", product=self.execution_1.build.version.product
)
self.execution_1.case.add_component(self.component)

Expand Down Expand Up @@ -120,7 +120,7 @@ def test_report_issue_from_test_execution_1click_works(self):
for expected_string in [
f"Filed from execution {self.execution_1.get_full_url()}",
"Reporter",
self.execution_1.run.plan.product.name,
self.execution_1.build.version.product.name,
self.component.name,
"Steps to reproduce",
self.execution_1.case.text,
Expand Down Expand Up @@ -177,11 +177,11 @@ def _fixture_setup(self):
self.execution_1.run.save()

# 'kiwitcms-bot' user is authorized only for this project
self.execution_1.run.plan.product.name = "Demo project"
self.execution_1.run.plan.product.save()
self.execution_1.build.version.product.name = "Demo project"
self.execution_1.build.version.product.save()

Check warning on line 181 in trackers_integration/tests/test_openproject.py

View check run for this annotation

Codecov / codecov/patch

trackers_integration/tests/test_openproject.py#L180-L181

Added lines #L180 - L181 were not covered by tests

self.component = ComponentFactory(
name="OpenProject integration", product=self.execution_1.run.plan.product
name="OpenProject integration", product=self.execution_1.build.version.product
)
self.execution_1.case.add_component(self.component)

Expand Down Expand Up @@ -263,7 +263,7 @@ def test_report_issue_from_test_execution_1click_works(self):
for expected_string in [
f"Filed from execution {self.execution_1.get_full_url()}",
"Reporter",
self.execution_1.run.plan.product.name,
self.execution_1.build.version.product.name,
self.component.name,
"Steps to reproduce",
self.execution_1.case.text,
Expand Down

0 comments on commit f518cf1

Please sign in to comment.