diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b6e9700..288b232 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -17,7 +17,7 @@ jobs: run: | python --version pip install --upgrade pip wheel - pip install django nose coverage + pip install django pynose coverage - name: Run coverage run: | coverage run -m nose diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4e78a60..89c0188 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,6 @@ jobs: strategy: fail-fast: false matrix: - # TODO: switch to pytest to support 3.10 (nosetests is broken on 3.10) python: ['3.9'] django: - 'Django>=3.2,<3.3' @@ -48,7 +47,7 @@ jobs: run: | python --version pip install --upgrade pip wheel - pip install "${{ matrix.django }}" psycopg2-binary nose flake8 coverage + pip install "${{ matrix.django }}" psycopg2-binary pynose flake8 coverage - name: Run tests env: DB_SETTINGS: >- diff --git a/README.md b/README.md index 2520a57..4d6baf7 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ Create/activate a python virtualenv and install the required dependencies. ```shell cd django-field-audit mkvirtualenv django-field-audit # or however you choose to setup your environment -pip install django nose flake8 coverage +pip install django pynose flake8 coverage ``` ### Running tests diff --git a/field_audit/models.py b/field_audit/models.py index 355e844..b5381ae 100644 --- a/field_audit/models.py +++ b/field_audit/models.py @@ -320,7 +320,7 @@ def get_delta_from_instance(cls, instance, is_create, is_delete): :returns: {field_name: {'old': old_value, 'new': new_value}, ...} :raises: ``AssertionError`` if both is_create and is_delete are true """ - assert not (is_create and is_delete),\ + assert not (is_create and is_delete), \ "is_create and is_delete cannot both be true" fields_to_audit = cls.field_names(instance) # SIDE EFFECT: fetch and reset initial values for next db write