mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Refactored filter logic and added human descriptions - refs #86
This commit is contained in:
parent
523c6f9e3a
commit
b4e6211a97
4 changed files with 108 additions and 50 deletions
|
|
@ -100,7 +100,8 @@ def test_custom_json_encoder(obj, expected):
|
|||
),
|
||||
])
|
||||
def test_build_where(args, expected_where, expected_params):
|
||||
sql_bits, actual_params = utils.build_where_clauses(args)
|
||||
f = utils.Filters(sorted(args.items()))
|
||||
sql_bits, actual_params = f.build_where_clauses()
|
||||
assert expected_where == sql_bits
|
||||
assert {
|
||||
'p{}'.format(i): param
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue