<s> from __future__ import unicode_literals <EOL> from pyeqs import Filter <EOL> from pyeqs . dsl import Term <EOL> from tests . helpers import homogeneous <EOL> def test_create_filter ( ) : <EOL> """<STR_LIT>""" <EOL> t = Filter ( ) <EOL> results = { <EOL> "<STR_LIT>" : [ ] <EOL> } <EOL> homogeneous ( t , results ) <EOL> def test_add_filter ( ) : <EOL> """<STR_LIT>""" <EOL> t = Filter ( ) <EOL> t . filter ( Term ( "<STR_LIT:foo>" , "<STR_LIT:bar>" ) ) <EOL> results = { <EOL> "<STR_LIT>" : [ <EOL> { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT:foo>" : "<STR_LIT:bar>" <EOL> } <EOL> } <EOL> ] <EOL> } <EOL> homogeneous ( t , results ) <EOL> def test_filter_with_or ( ) : <EOL> """<STR_LIT>""" <EOL> t = Filter ( "<STR_LIT>" ) <EOL> results = { <EOL> "<STR_LIT>" : [ ] <EOL> } <EOL> homogeneous ( t , results ) <EOL> def test_filter_with_and ( ) : <EOL> """<STR_LIT>""" <EOL> t = Filter ( "<STR_LIT>" ) <EOL> results = { <EOL> "<STR_LIT>" : [ ] <EOL> } <EOL> homogeneous ( t , results ) </s>
