diff test/rest_common.py @ 5729:9ea2ce9d10cf

A few internet references report that etags for the same underlying resource but with different representation (xml, json ...) should have different etags. That is currently not the case. Added code to allow incorporation of representation info into the etag. By default the representation is "json", but future patches can pass the representation down and modify flow to match requested representation.
author John Rouillard <rouilj@ieee.org>
date Sat, 25 May 2019 14:23:16 -0400
parents bfd28644fe43
children 0e6ed3d72f92
line wrap: on
line diff
--- a/test/rest_common.py	Fri May 24 17:23:08 2019 -0400
+++ b/test/rest_common.py	Sat May 25 14:23:16 2019 -0400
@@ -655,14 +655,14 @@
             items = node.items(protected=True) # include every item
             print(repr(sorted(items)))
             print(etag)
-            self.assertEqual(etag, '"f2901b2653b813eeb277c0dc84c03ba3"')
+            self.assertEqual(etag, '"0433784660a141e8262835171e70fd2f"')
 
             # modify key and verify we have a different etag
             etag = calculate_etag(node, self.db.config['WEB_SECRET_KEY'] + "a")
             items = node.items(protected=True) # include every item
             print(repr(sorted(items)))
             print(etag)
-            self.assertNotEqual(etag, '"f2901b2653b813eeb277c0dc84c03ba3"')
+            self.assertNotEqual(etag, '"0433784660a141e8262835171e70fd2f"')
 
             # change data and verify we have a different etag
             node.username="Paul"
@@ -670,7 +670,7 @@
             items = node.items(protected=True) # include every item
             print(repr(sorted(items)))
             print(etag)
-            self.assertEqual(etag, '"98f8052193220afdb649c6caaaa80e40"')
+            self.assertEqual(etag, '"8abeacd284d58655c620d60389e29d4d"')
         finally:
             date.Date = originalDate
         

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