-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPTOOLS-1903] Remove stale data in ES index (#15)
- Loading branch information
1 parent
37c700d
commit 3b89a78
Showing
5 changed files
with
47 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from setuptools import setup, find_packages | ||
|
||
|
||
__version__ = '1.0.5' | ||
__version__ = '1.0.6' | ||
|
||
|
||
setup( | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import unittest | ||
from databuilder.extractor.neo4j_search_data_extractor import Neo4jSearchDataExtractor | ||
|
||
|
||
class TestNeo4jExtractor(unittest.TestCase): | ||
|
||
def test_adding_filter(self): | ||
# type: (Any) -> None | ||
extractor = Neo4jSearchDataExtractor() | ||
actual = extractor._add_publish_tag_filter('foo', 'MATCH (table:Table) {publish_tag_filter} RETURN table') | ||
|
||
self.assertEqual(actual, """MATCH (table:Table) WHERE table.published_tag = 'foo' RETURN table""") | ||
|
||
def test_not_adding_filter(self): | ||
# type: (Any) -> None | ||
extractor = Neo4jSearchDataExtractor() | ||
actual = extractor._add_publish_tag_filter('', 'MATCH (table:Table) {publish_tag_filter} RETURN table') | ||
|
||
self.assertEqual(actual, """MATCH (table:Table) RETURN table""") | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |