From 9429f1574cb6748adbbd0e189fa1a0680a506c11 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Fri, 24 May 2024 22:19:21 +0300 Subject: [PATCH] update version matrix (#38) * update python versions test matrix * fix workflow file * fix missing key tests --- .github/workflows/ci.yml | 8 ++++---- requirements.txt | 6 +++--- setup.py | 4 +++- tests/v3_tests.py | 1 - tests/v4_tests.py | 1 - tests/v5_tests.py | 1 - 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eb9edc..6e33c6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8] + python-version: ['3.8', '3.9', '3.10', '3.11'] include: - - python-version: '3.9' + - python-version: '3.12' coverage: 1 steps: - uses: actions/checkout@v2 @@ -51,13 +51,13 @@ jobs: env: COVERAGE: ${{ matrix.coverage }} if: env.COVERAGE != 1 - run: nosetests -v + run: python -m unittest tests/*.py - name: Tests with coverage env: COVERAGE: ${{ matrix.coverage }} if: env.COVERAGE == 1 run: | - nosetests -v --with-coverage --cover-xml + coverage run -m unittest tests/*.py - name: Coverage env: COVERAGE: ${{ matrix.coverage }} diff --git a/requirements.txt b/requirements.txt index d77bb8a..2749581 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ multidimensional-urlencode==0.0.4 nose==1.3.7 -requests==2.32.0 +requests==2.32.1 coverage==4.5.4 -pook==1.0.1 -setuptools==65.5.1 +pook==1.3.0 +setuptools==70.0.0 diff --git a/setup.py b/setup.py index 578d0aa..ccaf379 100644 --- a/setup.py +++ b/setup.py @@ -34,9 +34,11 @@ setup( 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3 :: Only', 'Topic :: Software Development :: Libraries :: Python Modules', ] diff --git a/tests/v3_tests.py b/tests/v3_tests.py index 9495536..a70da79 100644 --- a/tests/v3_tests.py +++ b/tests/v3_tests.py @@ -168,7 +168,6 @@ class TestVersion3(unittest.TestCase): """ (pook.get(os.getenv('RETAILCRM_URL') + '/api/v3/statistic/update') - .headers({'X-API-KEY': None}) .reply(200) .headers(self.__header) .json({'errorMsg': '"apiKey" is missing.'}) diff --git a/tests/v4_tests.py b/tests/v4_tests.py index dd64542..e2a6c8e 100644 --- a/tests/v4_tests.py +++ b/tests/v4_tests.py @@ -164,7 +164,6 @@ class TestVersion4(unittest.TestCase): """ (pook.get(os.getenv('RETAILCRM_URL') + '/api/v4/statistic/update') - .headers({'X-API-KEY': None}) .reply(200) .headers(self.__header) .json({'errorMsg': '"apiKey" is missing.'}) diff --git a/tests/v5_tests.py b/tests/v5_tests.py index ed93a13..faf56b1 100644 --- a/tests/v5_tests.py +++ b/tests/v5_tests.py @@ -245,7 +245,6 @@ class TestVersion5(unittest.TestCase): """ (pook.get(os.getenv('RETAILCRM_URL') + '/api/v5/statistic/update') - .headers({'X-API-KEY': None}) .reply(200) .headers(self.__header) .json({'errorMsg': '"apiKey" is missing.'})