diff roundup/rest.py @ 5987:ea3485c67f94

Sort accept keys to make p2 and p3 ordering the same Sort keys of self.__accepted_content_type. Keys returned in different orders in python2/3. Sorting makes testing easier.
author John Rouillard <rouilj@ieee.org>
date Tue, 26 Nov 2019 20:47:34 -0500
parents 25a813415d59
children 776ca681f925
line wrap: on
line diff
--- a/roundup/rest.py	Tue Nov 26 20:13:42 2019 -0500
+++ b/roundup/rest.py	Tue Nov 26 20:47:34 2019 -0500
@@ -1987,7 +1987,7 @@
             self.client.response_code = 406
             output = ( "Requested content type '%s' is not available.\n"
                        "Acceptable types: %s"%(data_type,
-                           ", ".join(self.__accepted_content_type.keys())))
+                           ", ".join(sorted(self.__accepted_content_type.keys()))))
 
         # Make output json end in a newline to
         # separate from following text in logs etc..

Roundup Issue Tracker: http://roundup-tracker.org/