diff --git a/ckanext/odsh/helpers_tpsh.py b/ckanext/odsh/helpers_tpsh.py index e543c5ccf420107f0d264a20db59fcc18b0bda7d..64b49aab49525f6a4d4304de26988ca78be40fab 100644 --- a/ckanext/odsh/helpers_tpsh.py +++ b/ckanext/odsh/helpers_tpsh.py @@ -67,7 +67,6 @@ def correct_missing_relationship(pkg_dict, pkg_relationships_from_model): relationship_for_package = { '__extras': { 'object_package_id': relationship_from_model.object_package_id, - 'revision_id': relationship_from_model.revision_id, 'subject_package_id': relationship_from_model.subject_package_id, }, 'comment': relationship_from_model.subject_package_id, diff --git a/ckanext/odsh/tests_tpsh/resources/org_dicts.py b/ckanext/odsh/tests_tpsh/resources/org_dicts.py index a9b43d2dab5e8f68cbccfb656269fd7518cb1b45..8e2167e4cee41bca2b115500acbf276fb7b41084 100644 --- a/ckanext/odsh/tests_tpsh/resources/org_dicts.py +++ b/ckanext/odsh/tests_tpsh/resources/org_dicts.py @@ -10,7 +10,6 @@ organization_with_address = { 'group_id': '63c87e74-60a9-4a4a-a980-d7983c47f92b', 'id': 'b31c1b27-8c4e-46d7-b533-30bc4cc93d0e', 'key': 'location', - 'revision_id': '5e9677a3-ddab-4306-850f-cfd4fad3d676', 'state': 'active', 'value': 'Müllerdorf' }, @@ -18,7 +17,6 @@ organization_with_address = { 'group_id': '63c87e74-60a9-4a4a-a980-d7983c47f92b', 'id': '7302c660-871e-44f0-92f4-18bc5b8953ec', 'key': 'mail', - 'revision_id': '5e9677a3-ddab-4306-850f-cfd4fad3d676', 'state': 'active', 'value': 'mueller@mueller.de' }, @@ -26,7 +24,6 @@ organization_with_address = { 'group_id': '63c87e74-60a9-4a4a-a980-d7983c47f92b', 'id': '6d3e02ba-b721-4362-92f3-985ed50f6c42', 'key': 'person', - 'revision_id': '5e9677a3-ddab-4306-850f-cfd4fad3d676', 'state': 'active', 'value': 'Michael Müller' }, @@ -34,7 +31,6 @@ organization_with_address = { 'group_id': '63c87e74-60a9-4a4a-a980-d7983c47f92b', 'id': 'baf92ac2-21e2-49f5-96f8-e48c7fd50cf0', 'key': 'street', - 'revision_id': '5e9677a3-ddab-4306-850f-cfd4fad3d676', 'state': 'active', 'value': 'Müllergasse 10' }, @@ -42,7 +38,6 @@ organization_with_address = { 'group_id': '63c87e74-60a9-4a4a-a980-d7983c47f92b', 'id': 'd5ce2972-487e-444b-95ba-c6a8db238c67', 'key': 'telephone', - 'revision_id': '5e9677a3-ddab-4306-850f-cfd4fad3d676', 'state': 'active', 'value': '040 123456' }, @@ -50,7 +45,6 @@ organization_with_address = { 'group_id': '63c87e74-60a9-4a4a-a980-d7983c47f92b', 'id': '00d1d308-6718-4d90-81ae-25ee3f0b76f7', 'key': 'web', - 'revision_id': '5e9677a3-ddab-4306-850f-cfd4fad3d676', 'state': 'active', 'value': 'mueller.de' } @@ -63,7 +57,6 @@ organization_with_address = { 'name': 'test-organisation', 'num_followers': 0, 'package_count': 51, - 'revision_id': '3040af6c-d3f6-462d-b48a-329d63e17a28', 'state': 'active', 'tags': [], 'title': 'Test-Organisation', diff --git a/ckanext/odsh/tests_tpsh/test_helpers_tpsh.py b/ckanext/odsh/tests_tpsh/test_helpers_tpsh.py index dc554cefc3a6d17c5ff3efc402e4a0a15b14b27d..7af9b58967175bac75c0c918c941e040c60fe58c 100644 --- a/ckanext/odsh/tests_tpsh/test_helpers_tpsh.py +++ b/ckanext/odsh/tests_tpsh/test_helpers_tpsh.py @@ -48,7 +48,6 @@ FakePackageRelationship = namedtuple( 'FakePackageRelationship', ''' object_package_id - revision_id subject_package_id id type @@ -60,7 +59,6 @@ class Test_correct_missing_relationship(unittest.TestCase): self.relationships_from_model = [ FakePackageRelationship( object_package_id='object package id', - revision_id='revision id', subject_package_id='subject package id', id='id', type='type' @@ -83,7 +81,6 @@ class Test_correct_missing_relationship(unittest.TestCase): { '__extras': { 'object_package_id': 'original object package id', - 'revision_id': 'original revision id', 'subject_package_id': 'original subject package id' }, 'comment': '', @@ -105,7 +102,6 @@ class Test_correct_missing_relationship(unittest.TestCase): { '__extras': { 'object_package_id': 'original object package id', - 'revision_id': 'original revision id', 'subject_package_id': 'original subject package id' }, 'comment': '', @@ -134,7 +130,6 @@ class Test_correct_missing_relationship(unittest.TestCase): { '__extras': { 'object_package_id': 'object package id', - 'revision_id': 'revision id', 'subject_package_id': 'subject package id' }, 'comment': '', @@ -154,7 +149,7 @@ class Test_correct_missing_relationship(unittest.TestCase): assert from_relationships(pkg_dict, key) is not None assert from_relationships(pkg_dict, key) == from_relationships(expected_pkg_dict, key) - for key in ('object_package_id', 'revision_id', 'subject_package_id'): + for key in ('object_package_id', 'subject_package_id'): assert pkg_dict is not None assert from_extras(pkg_dict, key) == from_extras(expected_pkg_dict, key)