Fix Python 3 compatibility and flake8 violations in tests#23
Closed
Copilot wants to merge 4 commits intochas/update-pythonfrom
Closed
Fix Python 3 compatibility and flake8 violations in tests#23Copilot wants to merge 4 commits intochas/update-pythonfrom
Copilot wants to merge 4 commits intochas/update-pythonfrom
Conversation
- Replace 'import mock' with 'from unittest import mock' in test files - Fix isinstance() check in test_actions.py - Remove extra blank lines in test_validators.py - Fix indentation in setup.py Co-authored-by: ChasNelson1990 <[email protected]>
Copilot
AI
changed the title
[WIP] Fix failing linters and tests in GitHub actions
Fix Python 3 compatibility and flake8 violations in tests
Dec 8, 2025
Member
|
@copilot this tests fail with: FAILED ckanext/fork/tests/test_validators.py::TestValidFork::test_valid_activity_id[None-result0] - ckan.logic.ValidationError: None - {'resources': [{'id': ['Resource id already exists.']}]}
FAILED ckanext/fork/tests/test_validators.py::TestValidFork::test_valid_activity_id[-result1] - ckan.logic.ValidationError: None - {'resources': [{'id': ['Resource id already exists.']}]}
FAILED ckanext/fork/tests/test_validators.py::TestValidFork::test_valid_activity_id[{good_object_id}-result2] - ckan.logic.ValidationError: None - {'resources': [{'id': ['Resource id already exists.']}]}
FAILED ckanext/fork/tests/test_validators.py::TestValidFork::test_valid_activity_id[bad-object-id-result3] - ckan.logic.ValidationError: None - {'resources': [{'id': ['Resource id already exists.']}]} |
- Create dataset before resource to avoid duplicate ID error - Pass package_id when creating resource (following conftest.py pattern) Co-authored-by: ChasNelson1990 <[email protected]>
Author
Fixed in commit 85d8a0d. The issue was the order of resource/dataset creation - the test was creating a resource first, then trying to add it to a new dataset, which caused a duplicate ID error. Now it follows the correct pattern: create dataset first, then create resource with |
Member
|
@copilot fix the lint issues |
Fixes flake8 lint error for unused variable Co-authored-by: ChasNelson1990 <[email protected]>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.