Mercurial > p > roundup > code
diff test/rest_common.py @ 5985:f1191a470598
Fix test to account for mixxing dicttoxml.
CI doesn't have dicttoxml installed. Make test pass with and without
it installed.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 26 Nov 2019 18:04:00 -0500 |
| parents | 25a813415d59 |
| children | 8b88fb789208 |
line wrap: on
line diff
--- a/test/rest_common.py Tue Nov 26 09:55:09 2019 -0500 +++ b/test/rest_common.py Tue Nov 26 18:04:00 2019 -0500 @@ -1580,8 +1580,14 @@ form) self.assertEqual(self.server.client.response_code, 406) print(results) + try: # only verify local copy not system installed copy + from roundup.dicttoxml import dicttoxml + includexml = ', application/xml' + except ImportError: + includexml = '' + response="Requested content type 'jon' is not available.\n" \ - "Acceptable types: */*, application/json, application/xml\n" + "Acceptable types: */*, application/json%s\n"%includexml self.assertEqual(results, response) # TEST #9
