Fix TextFilterFacet and make query most important option.
This commit is contained in:
parent
a34c8c72c9
commit
b23147ce48
|
@ -36,9 +36,9 @@ class Facet(object):
|
|||
|
||||
|
||||
class TextFilterFacet(Facet):
|
||||
def __init__(self, column, query):
|
||||
super(TextFacet, self).__init__(column, type='text', mode='text',
|
||||
query=query, **options)
|
||||
def __init__(self, column, query, **options):
|
||||
super(TextFilterFacet, self).__init__(column, query=query, type='text',
|
||||
mode='text', **options)
|
||||
|
||||
|
||||
class TextFacet(Facet):
|
||||
|
|
|
@ -49,6 +49,8 @@ class FacetTest(unittest.TestCase):
|
|||
facet = FlaggedFacet(False)
|
||||
self.assertEqual(facet.selection[0]['v']['v'], False)
|
||||
self.assertRaises(ValueError, FlaggedFacet, 'false') # no strings
|
||||
facet = TextFilterFacet('column name', 'query')
|
||||
self.assertEqual(facet.query, 'query')
|
||||
|
||||
def test_selections(self):
|
||||
facet = TextFacet('column name')
|
||||
|
|
Loading…
Reference in New Issue