Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix topic search #892

Merged
merged 1 commit into from May 9, 2017
Merged

Fix topic search #892

merged 1 commit into from May 9, 2017

Conversation

noirbizarre
Copy link
Contributor

This PR ensures dataset or reuse without the required tags are never included in topic search

self.assertEqual(len(result), 0)

def test_empty_search_with_match(self):
'''Should only return no data with at least one tag'''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only return data matching topic's tag? Otherwise I don't get the logic?

excluded = VisibleDatasetFactory.create_batch(2, tags=[
'out', 'filtered'
])
topic = TopicFactory(tags=['in', 'no-match'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the no-match required if not tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

with self.autoindex():
included = VisibleDatasetFactory.create_batch(2, tags=['in'])
excluded = VisibleDatasetFactory.create_batch(2, tags=['out'])
topic = TopicFactory(tags=['in', 'no-match'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, is no-match useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ensures at least is the condition, not all

@noirbizarre noirbizarre merged commit 82169ae into opendatateam:master May 9, 2017
@noirbizarre noirbizarre deleted the fix-topic-search branch May 9, 2017 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants