Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get migration_package_activity and tests working, by putting revision…
… model in revision_legacy_code.py * Having removed the revision model (Revision, PackageRevision etc) from the core ckan code, now we add it back into ckan/migration/revision_legacy_code.py (RevisionTableMappings) so it can be used by the migration_package_activity.py and its tests. Also includes associated vdm functions: * make_revisioned_table * make_revision_table * make_Revision * Fix up some tests in test_migration_package_activity associated with revision_id now being missing from domain objects. * migration tests have to make revisions manually now (make_revision()), because previously the revisioned tables (e.g. Package) had a mapper extension vdm.sqlalchemy.Revisioner(package_revision_table) that triggered on table changes and records a copy in the corresponding revision table (e.g. PackageRevision). HOWEVER we can't add this to the mapping for the migration test and then remove it for the rest of the CKAN tests. * Fix up some tests following test_migration_package_activity - PackageDictizeMonkeyPatch is introduced to monkeypatch package_dictize. Previously it was being patched in test_migration_package_activity but not being put back for the following tests. * vdm is now only required by migration_package_activity.py and its tests.
- Loading branch information
David Read
committed
Mar 29, 2019
1 parent
02d323f
commit 88d0e9f
Showing
6 changed files
with
415 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.