mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
fix up test
This commit is contained in:
parent
bd1f8b088f
commit
23ce5ab9de
@ -1,7 +1,6 @@
|
||||
|
||||
# Python
|
||||
import pytest
|
||||
from pyparsing import ParseException
|
||||
|
||||
# AWX
|
||||
from awx.main.fields import DynamicFilterField
|
||||
@ -32,8 +31,9 @@ class TestDynamicFilterFieldFilterStringToQ():
|
||||
'a__b__c__ space =ggg',
|
||||
])
|
||||
def test_invalid_filter_strings(self, filter_string):
|
||||
with pytest.raises(ParseException):
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
DynamicFilterField.filter_string_to_q(filter_string)
|
||||
assert e.value.message == u"Invalid query " + filter_string
|
||||
|
||||
@pytest.mark.parametrize("filter_string,q_expected", [
|
||||
(u'(a=abc\u1F5E3def)', Q(**{u"a": u"abc\u1F5E3def"})),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user