diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 472e8d0..358993a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,19 +35,19 @@ jobs: run: cd alfresco && docker-compose up -d - name: Install dependencies - run: pip install tox tox-gh-actions codecov + run: pip install tox tox-gh-actions - name: Run tests - run: | - export TOXENV=py${PYTHON_VERSION/./}-django${DJANGO/./}-$(echo $CMIS_BINDING | tr '[:upper:]' '[:lower:]') - tox - codecov -e TOXENV,DJANGO --file reports/coverage-${TOXENV}.xml + run: tox env: PYTHON_VERSION: ${{ matrix.python }} DJANGO: ${{ matrix.django }} CMIS_BINDING: ${{ matrix.binding }} CMIS_URL_MAPPING_ENABLED: ${{ matrix.cmisurlmapping }} + - name: Publish coverage report + uses: codecov/codecov-action@v3 + publish: name: Publish package to PyPI runs-on: ubuntu-latest diff --git a/drc_cmis/models.py b/drc_cmis/models.py index 2d859b4..34a3a25 100644 --- a/drc_cmis/models.py +++ b/drc_cmis/models.py @@ -5,7 +5,6 @@ from django.utils.translation import gettext_lazy as _ import pytz -from djchoices import ChoiceItem, DjangoChoices from solo.models import SingletonModel from .utils.exceptions import NoOtherBaseFolderException, NoZaakBaseFolderException @@ -99,9 +98,9 @@ def get_other_base_folder_name(self) -> str: raise ImproperlyConfigured("The 'other_folder_path' must be configured.") -class Vendor(DjangoChoices): - alfresco = ChoiceItem() - bct = ChoiceItem() +class Vendor(models.TextChoices): + alfresco = "alfresco" + bct = "bct" class UrlMapping(models.Model): diff --git a/setup.cfg b/setup.cfg index 95fb619..467bd13 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,6 @@ include_package_data = True packages = find: install_requires = django>=3.2.0,<4.0 - django-choices cmislib-maykin >= 0.7.2.dev0 django-solo iso8601 diff --git a/tests/test_clients.py b/tests/test_clients.py index eeebb61..6bde551 100644 --- a/tests/test_clients.py +++ b/tests/test_clients.py @@ -1531,7 +1531,7 @@ def test_full_update_gebruiksrechten(self): # Create gebruiksrechten gebruiksrechten_data = { - "informatieobject": f"https://testserver/api/v1/documenten/{document.uuid}", + "informatieobject": f"https://drc.utrechtproeftuin.nl/api/v1/documenten/{document.uuid}", "startdatum": "2018-12-24T00:00:00Z", "omschrijving_voorwaarden": "Test voorwaarden", } @@ -1543,7 +1543,7 @@ def test_full_update_gebruiksrechten(self): self.assertEqual("Test voorwaarden", gebruiksrechten.omschrijving_voorwaarden) updated_data = { - "informatieobject": f"https://testserver/api/v1/documenten/{document.uuid}", + "informatieobject": f"https://drc.utrechtproeftuin.nl/api/v1/documenten/{document.uuid}", "startdatum": "2018-12-24T00:00:00Z", "omschrijving_voorwaarden": "Aangepaste voorwaarden", } @@ -1582,7 +1582,7 @@ def test_partial_update_gebruiksrechten(self): # Create gebruiksrechten gebruiksrechten_data = { - "informatieobject": f"https://testserver/api/v1/documenten/{document.uuid}", + "informatieobject": f"https://drc.utrechtproeftuin.nl/api/v1/documenten/{document.uuid}", "startdatum": "2018-12-24T00:00:00Z", "omschrijving_voorwaarden": "Test voorwaarden", }