Skip to content

Commit

Permalink
Merge branch 'master' into new-results-libs
Browse files Browse the repository at this point in the history
  • Loading branch information
pyscht authored Aug 3, 2023
2 parents fe1907b + b41a17e commit 057dd0a
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 55 deletions.
2 changes: 1 addition & 1 deletion qase-pytest/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ long-description = file: README.md
long-description-content-type = text/markdown; charset=UTF-8; variant=GFM
url = https://github.com/qase-tms/qase-python/tree/master/qase-pytest
platforms = any
version = 5.0.0
version = 5.0.2
classifiers =
Development Status :: 5 - Production/Stable
Framework :: Pytest
Expand Down
2 changes: 1 addition & 1 deletion qase-pytest/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pkg_resources import VersionConflict, require
from setuptools import setup

VERSION = "5.0.0"
VERSION = "5.0.2"

try:
require("setuptools>=38.3")
Expand Down
3 changes: 2 additions & 1 deletion qase-pytest/src/qaseio/pytest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def pytest_configure(config):
api_token=config.getoption("qase_testops_api_token"),
host=config.getoption("qase_testops_api_host", "qase.io"),
)
execution_plan = loader.load(config.getoption("qase_testops_project"), config.getoption("qase_testops_plan_id"))
execution_plan = loader.load(config.getoption("qase_testops_project"),
int(config.getoption("qase_testops_plan_id")))

reporter = QaseTestOps(
api_token=config.getoption("qase_testops_api_token"),
Expand Down
16 changes: 8 additions & 8 deletions qase-python-commons/src/qaseio/commons/testops.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ def __init__(self,

self.client = ApiClient(configuration)

parseBool = lambda d : d in ("y", "yes", "true", "1", 1, True)

self.project_code = project_code
self.run_id = int(run_id) if run_id else run_id
self.plan_id = plan_id
self.bulk = bulk
self.defect = defect
self.complete_after_run = complete_run
self.plan_id = int(plan_id) if plan_id else plan_id
self.bulk = parseBool(bulk)
self.defect = parseBool(defect)
self.complete_after_run = parseBool(complete_run)
self.environment = None
if environment:
if isinstance(environment, str):
Expand All @@ -66,9 +68,7 @@ def __init__(self,
self.environment_id = environment
self.host = host
self.enabled = True
if (chunk_size > 2000):
chunk_size = 2000
self.chunk_size = chunk_size
self.chunk_size = min(2000, max(10, int(chunk_size)))

if run_title and run_title != '':
self.run_title = run_title
Expand Down Expand Up @@ -368,4 +368,4 @@ def add_result(self, result: Result):
if self.bulk:
self.results.append(result)
else:
self._send_result(result)
self._send_result(result)
2 changes: 1 addition & 1 deletion qaseio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Class | Method | HTTP request | Description
*AttachmentsApi* | [**upload_attachment**](docs/AttachmentsApi.md#upload_attachment) | **POST** /attachment/{code} | Upload attachment.
*AuthorsApi* | [**get_author**](docs/AuthorsApi.md#get_author) | **GET** /author/{id} | Get a specific author.
*AuthorsApi* | [**get_authors**](docs/AuthorsApi.md#get_authors) | **GET** /author | Get all authors.
*CasesApi* | [**bulk**](docs/CasesApi.md#bulk) | **POST** /case/{code}/bulk | Create test cases in bulk.
*CasesApi* | [**bulk**](docs/CasesApi.md#bulk) | **POST** /case/{code}/bulk | Create a new test cases.
*CasesApi* | [**create_case**](docs/CasesApi.md#create_case) | **POST** /case/{code} | Create a new test case.
*CasesApi* | [**delete_case**](docs/CasesApi.md#delete_case) | **DELETE** /case/{code}/{id} | Delete test case.
*CasesApi* | [**get_case**](docs/CasesApi.md#get_case) | **GET** /case/{code}/{id} | Get a specific test case.
Expand Down
6 changes: 3 additions & 3 deletions qaseio/docs/CasesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All URIs are relative to *https://api.qase.io/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**bulk**](CasesApi.md#bulk) | **POST** /case/{code}/bulk | Create test cases in bulk.
[**bulk**](CasesApi.md#bulk) | **POST** /case/{code}/bulk | Create new test cases.
[**create_case**](CasesApi.md#create_case) | **POST** /case/{code} | Create a new test case.
[**delete_case**](CasesApi.md#delete_case) | **DELETE** /case/{code}/{id} | Delete test case.
[**get_case**](CasesApi.md#get_case) | **GET** /case/{code}/{id} | Get a specific test case.
Expand All @@ -15,7 +15,7 @@ Method | HTTP request | Description
# **bulk**
> Bulk200Response bulk(code, bulk_request)
Create test cases in bulk.
Create new test cases.

This method allows to bulk create new test cases in a project.

Expand Down Expand Up @@ -60,7 +60,7 @@ with qaseio.ApiClient(configuration) as api_client:

# example passing only required values which don't have defaults set
try:
# Create test cases in bulk.
# Create new test cases.
api_response = api_instance.bulk(code, bulk_request)
pprint(api_response)
except qaseio.ApiException as e:
Expand Down
2 changes: 1 addition & 1 deletion qaseio/qaseio/api/cases_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def bulk(
bulk_request,
**kwargs
):
"""Create test cases in bulk. # noqa: E501
"""Create new test cases. # noqa: E501
This method allows to bulk create new test cases in a project. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
Expand Down
2 changes: 1 addition & 1 deletion qaseio/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
author="Qase.io",
author_email="[email protected]",
url="https://github.com/qase-tms/qase-python",
keywords=["OpenAPI", "OpenAPI-Generator", "Qase.io API"],
keywords=["OpenAPI", "OpenAPI-Generator", "Qase TestOps API"],
python_requires=">=3.6",
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
Expand Down
38 changes: 0 additions & 38 deletions qaseio/test/test_step_result.py

This file was deleted.

0 comments on commit 057dd0a

Please sign in to comment.