Skip to content

Commit d17fe45

Browse files
committed
Add test for @pretty=false format change.
1 parent ef38353 commit d17fe45

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/test_cgi.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,11 @@ def wh(s):
10961096
# Should work as all required headers are present.
10971097
cl.handle_rest()
10981098
answer='{"data": {"link": "http://tracker.example/cgi-bin/roundup.cgi/bugs/rest/data/issue/1", "id": "1"}}\n'
1099+
# check length to see if pretty is turned off.
1100+
self.assertEqual(len(out[0]), 99)
1101+
1102+
# compare as dicts not strings due to different key ordering
1103+
# between python versions.
10991104
response=json.loads(b2s(out[0]))
11001105
expected=json.loads(answer)
11011106
self.assertEqual(response,expected)

0 commit comments

Comments
 (0)