From 6bf5749056ff9f5bc234e770518cdf2a9f0fc971 Mon Sep 17 00:00:00 2001 From: Jay Guo Date: Thu, 7 Mar 2024 16:26:33 -0500 Subject: [PATCH] Remove ckan 2.7 test --- .github/workflows/test.yml | 10 ++-------- ckanext/subscribe/tests/test_notification_email.py | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00bfac1..48b8bfc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: test: strategy: matrix: - ckan-version: [2.9, 2.8, 2.7] + ckan-version: [2.9] fail-fast: false name: CKAN ${{ matrix.ckan-version }} @@ -56,18 +56,12 @@ jobs: run: | pip install -r requirements.txt -r dev-requirements.txt -e . - - name: Setup extension (CKAN >= 2.9) + - name: Setup extension (CKAN == 2.9) if: ${{ matrix.ckan-version == '2.9' }} run: | ckan -c git_action_test.ini db init ckan -c git_action_test.ini subscribe initdb - - name: Setup extension (CKAN 2.7) - if: ${{ matrix.ckan-version != '2.9' }} - run: | - paster --plugin=ckan db init -c git_action_test.ini - paster --plugin=ckanext-subscribe subscribe initdb -c git_action_test.ini - - name: Run tests run: | pytest --ckan-ini=git_action_test.ini --cov=ckanext.subscribe --cov-fail-under=${CODE_COVERAGE_THRESHOLD_REQUIRED} --disable-warnings ckanext/subscribe/tests \ No newline at end of file diff --git a/ckanext/subscribe/tests/test_notification_email.py b/ckanext/subscribe/tests/test_notification_email.py index 1f25269..ceb2ea6 100644 --- a/ckanext/subscribe/tests/test_notification_email.py +++ b/ckanext/subscribe/tests/test_notification_email.py @@ -47,7 +47,7 @@ def test_basic(self, mail_recipient): body = mail_recipient.call_args[1]['body'] print(body) assert dataset['title'] in body - assert'{}/dataset/{}'.format(config.get('ckan.site_url'), dataset['id']) in body + assert '{}/dataset/{}'.format(config.get('ckan.site_url'), dataset['id']) in body assert 'new dataset' in body body = mail_recipient.call_args[1]['body_html'] print(body)