File: test_issue_property.py

package info (click to toggle)
python-jira 3.10.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,024 kB
  • sloc: python: 8,877; sh: 13; makefile: 7; xml: 4
file content (23 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from __future__ import annotations

from tests.conftest import JiraTestCase


class IssuePropertyTests(JiraTestCase):
    def setUp(self):
        JiraTestCase.setUp(self)
        self.issue_1 = self.test_manager.project_b_issue1

    def test_issue_property(self):
        self.jira.add_issue_property(
            self.issue_1, "custom-property", "Testing a property value"
        )
        properties = self.jira.issue_properties(self.issue_1)
        self.assertEqual(len(properties), 1)

        prop = self.jira.issue_property(self.issue_1, "custom-property")
        self.assertEqual(prop.key, "custom-property")
        self.assertEqual(prop.value, "Testing a property value")
        prop.delete()
        properties = self.jira.issue_properties(self.issue_1)
        self.assertEqual(len(properties), 0)