testrail-api 1.13.0__tar.gz → 1.13.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {testrail_api-1.13.0 → testrail_api-1.13.2}/PKG-INFO +2 -2
  2. {testrail_api-1.13.0 → testrail_api-1.13.2}/Pipfile +6 -7
  3. {testrail_api-1.13.0 → testrail_api-1.13.2}/setup.cfg +3 -0
  4. {testrail_api-1.13.0 → testrail_api-1.13.2}/setup.py +2 -2
  5. testrail_api-1.13.2/testrail_api/__version__.py +16 -0
  6. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api/_category.py +8 -0
  7. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api/_session.py +4 -7
  8. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api.egg-info/PKG-INFO +2 -2
  9. testrail_api-1.13.2/testrail_api.egg-info/requires.txt +1 -0
  10. testrail_api-1.13.2/tests/test_statuses.py +44 -0
  11. testrail_api-1.13.0/testrail_api/__version__.py +0 -4
  12. testrail_api-1.13.0/testrail_api.egg-info/requires.txt +0 -1
  13. testrail_api-1.13.0/tests/test_statuses.py +0 -16
  14. {testrail_api-1.13.0 → testrail_api-1.13.2}/.editorconfig +0 -0
  15. {testrail_api-1.13.0 → testrail_api-1.13.2}/.github/workflows/python-package.yml +0 -0
  16. {testrail_api-1.13.0 → testrail_api-1.13.2}/.github/workflows/python-publish.yml +0 -0
  17. {testrail_api-1.13.0 → testrail_api-1.13.2}/.gitignore +0 -0
  18. {testrail_api-1.13.0 → testrail_api-1.13.2}/LICENSE +0 -0
  19. {testrail_api-1.13.0 → testrail_api-1.13.2}/README.md +0 -0
  20. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api/__init__.py +0 -0
  21. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api/_enums.py +0 -0
  22. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api/_exception.py +0 -0
  23. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api/_testrail_api.py +0 -0
  24. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api.egg-info/SOURCES.txt +0 -0
  25. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api.egg-info/dependency_links.txt +0 -0
  26. {testrail_api-1.13.0 → testrail_api-1.13.2}/testrail_api.egg-info/top_level.txt +0 -0
  27. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/attach.jpg +0 -0
  28. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/conftest.py +0 -0
  29. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/pytest.ini +0 -0
  30. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_attachments.py +0 -0
  31. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_case_fields.py +0 -0
  32. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_case_types.py +0 -0
  33. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_cases.py +0 -0
  34. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_configurations.py +0 -0
  35. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_datasets.py +0 -0
  36. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_groups.py +0 -0
  37. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_milestone.py +0 -0
  38. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_other.py +0 -0
  39. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_plans.py +0 -0
  40. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_priorities.py +0 -0
  41. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_projects.py +0 -0
  42. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_reports.py +0 -0
  43. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_result_fields.py +0 -0
  44. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_results.py +0 -0
  45. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_roles.py +0 -0
  46. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_runs.py +0 -0
  47. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_sections.py +0 -0
  48. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_shared_steps.py +0 -0
  49. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_suites.py +0 -0
  50. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_template.py +0 -0
  51. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_tests.py +0 -0
  52. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_users.py +0 -0
  53. {testrail_api-1.13.0 → testrail_api-1.13.2}/tests/test_variables.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testrail_api
3
- Version: 1.13.0
3
+ Version: 1.13.2
4
4
  Summary: Python wrapper of the TestRail API
5
5
  Home-page: https://github.com/tolstislon/testrail-api
6
6
  Author: tolstislon
@@ -24,7 +24,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
24
  Requires-Python: >=3.8
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Requires-Dist: requests>=2.20.1
27
+ Requires-Dist: requests>=2.32.3
28
28
 
29
29
  # Testrail Api
30
30
 
@@ -4,16 +4,15 @@ url = "https://pypi.org/simple"
4
4
  verify_ssl = true
5
5
 
6
6
  [dev-packages]
7
- pytest = "==7.4.4"
8
- pytest-cov = "==4.1.0"
7
+ pytest = "==8.2.2"
8
+ pytest-cov = "==5.0.0"
9
9
  responses = "==0.21.0"
10
- black = "==23.12.1"
11
- flake8 = "==7.0.0"
12
- pep8-naming = "==0.13.3"
13
- twine = "==4.0.2"
10
+ black = "==24.4.2"
11
+ flake8 = "==7.1.0"
12
+ pep8-naming = "==0.14.1"
14
13
 
15
14
  [packages]
16
- requests = "==2.31.0"
15
+ requests = "==2.32.3"
17
16
  testrail-api = { editable = true, path = "." }
18
17
 
19
18
  [requires]
@@ -4,6 +4,9 @@ count = True
4
4
  extend-ignore = E203
5
5
  exclude = __version__.py
6
6
 
7
+ [coverage:run]
8
+ omit = testrail_api/__version__.py
9
+
7
10
  [egg_info]
8
11
  tag_build =
9
12
  tag_date = 0
@@ -17,8 +17,8 @@ setup(
17
17
  long_description=long_description,
18
18
  long_description_content_type="text/markdown",
19
19
  use_scm_version={"write_to": "testrail_api/__version__.py"},
20
- setup_requires=["setuptools_scm==7.1.0"],
21
- install_requires=["requests>=2.20.1"],
20
+ setup_requires=["setuptools_scm"],
21
+ install_requires=["requests>=2.32.3"],
22
22
  python_requires=">=3.8",
23
23
  include_package_data=True,
24
24
  keywords=[
@@ -0,0 +1,16 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ TYPE_CHECKING = False
4
+ if TYPE_CHECKING:
5
+ from typing import Tuple, Union
6
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
7
+ else:
8
+ VERSION_TUPLE = object
9
+
10
+ version: str
11
+ __version__: str
12
+ __version_tuple__: VERSION_TUPLE
13
+ version_tuple: VERSION_TUPLE
14
+
15
+ __version__ = version = '1.13.2'
16
+ __version_tuple__ = version_tuple = (1, 13, 2)
@@ -1905,6 +1905,14 @@ class Statuses(_MetaCategory):
1905
1905
  """
1906
1906
  return self.s.get(endpoint="get_statuses")
1907
1907
 
1908
+ def get_case_statuses(self) -> List[dict]:
1909
+ """
1910
+ Returns a list of available test case statuses
1911
+
1912
+ :return: response
1913
+ """
1914
+ return self.s.get(endpoint="get_case_statuses")
1915
+
1908
1916
 
1909
1917
  class Suites(_MetaCategory):
1910
1918
  """https://www.gurock.com/testrail/docs/api/reference/suites"""
@@ -114,27 +114,24 @@ class Session:
114
114
  @staticmethod
115
115
  def __get_url(url: str, warn_ignore: bool) -> str:
116
116
  """Reading URL"""
117
- _url = url or environ.get(Environ.URL)
118
- if not _url:
117
+ if not (_url := url or environ.get(Environ.URL)):
119
118
  raise TestRailError(f"Url is not set. Use argument url or env {Environ.URL}")
120
119
  _url = _url.rstrip("/")
121
120
  if _url.startswith("http://") and not warn_ignore:
122
- warnings.warn("Using HTTP and not HTTPS may cause writeable API " "requests to return 404 errors")
121
+ warnings.warn("Using HTTP and not HTTPS may cause writeable API requests to return 404 errors")
123
122
  return _url
124
123
 
125
124
  @staticmethod
126
125
  def __get_email(email: Optional[str]) -> str:
127
126
  """Reading email"""
128
- _email = email or environ.get(Environ.EMAIL)
129
- if not _email:
127
+ if not (_email := email or environ.get(Environ.EMAIL)):
130
128
  raise TestRailError(f"Email is not set. Use argument email or env {Environ.EMAIL}")
131
129
  return _email
132
130
 
133
131
  @staticmethod
134
132
  def __get_password(password: str) -> str:
135
133
  """Reading password"""
136
- _password = password or environ.get(Environ.PASSWORD)
137
- if not _password:
134
+ if not (_password := password or environ.get(Environ.PASSWORD)):
138
135
  raise TestRailError(f"Password is not set. Use argument password or env {Environ.PASSWORD}")
139
136
  return _password
140
137
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testrail_api
3
- Version: 1.13.0
3
+ Version: 1.13.2
4
4
  Summary: Python wrapper of the TestRail API
5
5
  Home-page: https://github.com/tolstislon/testrail-api
6
6
  Author: tolstislon
@@ -24,7 +24,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
24
  Requires-Python: >=3.8
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Requires-Dist: requests>=2.20.1
27
+ Requires-Dist: requests>=2.32.3
28
28
 
29
29
  # Testrail Api
30
30
 
@@ -0,0 +1 @@
1
+ requests>=2.32.3
@@ -0,0 +1,44 @@
1
+ import json
2
+
3
+ import responses
4
+
5
+
6
+ def test_get_statuses(api, mock, url):
7
+ mock.add_callback(
8
+ responses.GET,
9
+ url('get_statuses'),
10
+ lambda x: (200, {}, json.dumps(
11
+ [{'id': 1, 'label': 'Passed'}, {'id': 5, 'label': 'Failed'}]
12
+ ))
13
+ )
14
+ resp = api.statuses.get_statuses()
15
+ assert resp[0]['id'] == 1
16
+ assert resp[1]['label'] == 'Failed'
17
+
18
+
19
+ def test_get_case_statuses(api, mock, url):
20
+ mock.add_callback(
21
+ responses.GET,
22
+ url('get_case_statuses'),
23
+ lambda x: (200, {}, json.dumps(
24
+ [
25
+ {
26
+ "case_status_id": 1,
27
+ "name": "Approved",
28
+ "abbreviation": None,
29
+ "is_default": False,
30
+ "is_approved": True
31
+ },
32
+ {
33
+ "case_status_id": 2,
34
+ "name": "Draft",
35
+ "abbreviation": None,
36
+ "is_default": True,
37
+ "is_approved": True
38
+ }
39
+ ]
40
+ ))
41
+ )
42
+ resp = api.statuses.get_case_statuses()
43
+ assert resp[0]['case_status_id'] == 1
44
+ assert resp[1]['name'] == 'Draft'
@@ -1,4 +0,0 @@
1
- # file generated by setuptools_scm
2
- # don't change, don't track in version control
3
- __version__ = version = '1.13.0'
4
- __version_tuple__ = version_tuple = (1, 13, 0)
@@ -1 +0,0 @@
1
- requests>=2.20.1
@@ -1,16 +0,0 @@
1
- import json
2
-
3
- import responses
4
-
5
-
6
- def test_get_statuses(api, mock, url):
7
- mock.add_callback(
8
- responses.GET,
9
- url('get_statuses'),
10
- lambda x: (200, {}, json.dumps(
11
- [{'id': 1, 'label': 'Passed'}, {'id': 5, 'label': 'Failed'}]
12
- ))
13
- )
14
- resp = api.statuses.get_statuses()
15
- assert resp[0]['id'] == 1
16
- assert resp[1]['label'] == 'Failed'
File without changes
File without changes
File without changes