Skip to content

Commit

Permalink
[#1572] Test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Sep 10, 2015
1 parent 945aad5 commit f48a8e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion ckan/migration/versions/079_resource_revision_index.py
Expand Up @@ -5,4 +5,3 @@ def upgrade(migrate_engine):
ON resource_revision (continuity_id);
'''
)

8 changes: 5 additions & 3 deletions ckan/tests/logic/action/test_delete.py
Expand Up @@ -188,6 +188,7 @@ def test_group_no_longer_shows_its_purged_dataset(self):
def test_purged_dataset_is_not_in_search_results(self):
search.clear()
dataset = factories.Dataset()

def get_search_results():
results = helpers.call_action('package_search',
q=dataset['title'])['results']
Expand Down Expand Up @@ -222,9 +223,10 @@ def test_purged_dataset_leaves_no_trace_in_the_model(self):
assert_equals(model.Session.query(model.PackageExtra).all(), [])
# the only member left is for the user created in factories.Group() and
# factories.Organization()
assert_equals([(m.table_name, m.group.name)
for m in model.Session.query(model.Member).join(model.Group)],
[('user', 'group1'), ('user', 'test_org_0')])
assert_equals(sorted(
[(m.table_name, m.group.name)
for m in model.Session.query(model.Member).join(model.Group)]),
[('user', 'group1'), ('user', org['name'])])

# all the object revisions were purged too
assert_equals(model.Session.query(model.PackageRevision).all(), [])
Expand Down

0 comments on commit f48a8e6

Please sign in to comment.