Skip to content

Commit

Permalink
Added a couple of extra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Mar 4, 2020
1 parent 2f77112 commit 9d153a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/filterparser/test_filterparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def test_list_properties(self):
# OPTIONAL:
self.assertIsInstance(self.parse('elements HAS ONLY "H","He","Ga","Ta"'), Tree)
self.assertIsInstance(self.parse('elements HAS ALL "H","He","Ga","Ta"'), Tree)
self.assertIsInstance(self.parse('elements HAS ANY "H","He","Ga","Ta"'), Tree)
self.assertIsInstance(
self.parse(
'elements:_exmpl_element_counts HAS "H":6 AND '
Expand Down
5 changes: 5 additions & 0 deletions tests/filtertransformers/test_mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ def test_list_properties(self):
{"elements": {"$in": ["H", "He", "Ga", "Ta"]}},
)

self.assertEqual(
self.transform('elements HAS ALL "H","He","Ga","Ta"'),
{"elements": {"$all": ["H", "He", "Ga", "Ta"]}},
)

self.assertEqual(
self.transform(
'elements HAS "H" AND elements HAS ALL "H","He","Ga","Ta" AND elements HAS '
Expand Down

0 comments on commit 9d153a2

Please sign in to comment.