add json a=null support and still support a="null"

related to #6016
This commit is contained in:
Chris Meyers
2017-04-13 16:26:35 -04:00
parent f20bf127b4
commit 5ff4966526
2 changed files with 14 additions and 1 deletions

View File

@@ -86,6 +86,14 @@ class TestDynamicFilterFieldFilterStringToQ():
q = DynamicFilterField.filter_string_to_q(filter_string)
assert unicode(q) == unicode(q_expected)
@pytest.mark.parametrize("filter_string,q_expected", [
('a__b__c=null', Q(**{u"a__b__c": u"null"})),
('a__b__c="null"', Q(**{u"a__b__c": u"\"null\""})),
])
def test_contains_query_generated_null(self, filter_string, q_expected):
q = DynamicFilterField.filter_string_to_q(filter_string)
assert unicode(q) == unicode(q_expected)
'''
#('"facts__quoted_val"="f\"oo"', 1),