Mercurial > p > roundup > code
diff test/test_cgi.py @ 5703:92c1864d5dd2
Add test for @pretty=false format change.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 10 Apr 2019 18:04:36 -0400 |
| parents | f90a534cb112 |
| children | 071625b5b7c0 |
line wrap: on
line diff
--- a/test/test_cgi.py Wed Apr 10 17:56:08 2019 -0400 +++ b/test/test_cgi.py Wed Apr 10 18:04:36 2019 -0400 @@ -1096,6 +1096,11 @@ # Should work as all required headers are present. cl.handle_rest() answer='{"data": {"link": "http://tracker.example/cgi-bin/roundup.cgi/bugs/rest/data/issue/1", "id": "1"}}\n' + # check length to see if pretty is turned off. + self.assertEqual(len(out[0]), 99) + + # compare as dicts not strings due to different key ordering + # between python versions. response=json.loads(b2s(out[0])) expected=json.loads(answer) self.assertEqual(response,expected)
