Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ee6f67

Browse files
committed
tests: add case query array, {} multiple condition to a same field
1 parent75272b5 commit4ee6f67

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎tests/test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,22 @@ def test_apijson_get():
951951
>>> print(d)
952952
{'code': 200, 'msg': 'success', '[]': [{'user': {'username': 'userb', 'nickname': 'User B', 'id': 3}}, {'user': {'username': 'userc', 'nickname': 'User C', 'id': 4}}]}
953953
954+
>>> #query array, {} multiple condition to a same field
955+
>>> data ='''{
956+
... "[]":{
957+
... "user": {
958+
... "@role": "ADMIN",
959+
... "id&{}": ">2,<=4",
960+
... "id{}": "!=3",
961+
... "@column": "username,nickname,id"
962+
... }
963+
... }
964+
... }'''
965+
>>> r = handler.post('/apijson/get', data=data, pre_call=pre_call_as("admin"), middlewares=[])
966+
>>> d = json_loads(r.data)
967+
>>> print(d)
968+
{'code': 200, 'msg': 'success', '[]': [{'user': {'username': 'userc', 'nickname': 'User C', 'id': 4}}]}
969+
954970
>>> #query array, !{} condition list
955971
>>> data ='''{
956972
... "[]":{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp