Commit 660dd980 authored by Jérome Perrin's avatar Jérome Perrin

SlapOSCacheMixin: store cache json sorted for easier testing

slapos_cloud:testSlapOSCloud fails with PYTHONHASHSEED=385
parent 9c328a1e
Pipeline #33361 canceled with stage
in 0 seconds
...@@ -138,7 +138,7 @@ class SlapOSCacheMixin: ...@@ -138,7 +138,7 @@ class SlapOSCacheMixin:
'state': state, 'state': state,
'reference': self.getReference(), 'reference': self.getReference(),
'portal_type': self.getPortalType() 'portal_type': self.getPortalType()
}) }, sort_keys=True)
cache_duration = self._getAccessStatusCacheFactory().cache_duration cache_duration = self._getAccessStatusCacheFactory().cache_duration
self._getAccessStatusPlugin().set(self._getAccessStatusCacheKey(), self._getAccessStatusPlugin().set(self._getAccessStatusCacheKey(),
......
...@@ -115,7 +115,9 @@ class TestSlapOSCloudSlapOSCacheMixin( ...@@ -115,7 +115,9 @@ class TestSlapOSCloudSlapOSCacheMixin(
'since': '%s' % since, 'since': '%s' % since,
'state': "", 'state': "",
"text": "#access TEST123 %s" % doc.getUid() "text": "#access TEST123 %s" % doc.getUid()
}) },
sort_keys=True,
)
def getBaseExpectedDict(doc): def getBaseExpectedDict(doc):
return _decode_with_json({ return _decode_with_json({
"portal_type": doc.getPortalType(), "portal_type": doc.getPortalType(),
...@@ -187,7 +189,9 @@ class TestSlapOSCloudSlapOSCacheMixin( ...@@ -187,7 +189,9 @@ class TestSlapOSCloudSlapOSCacheMixin(
'since': '%s' % since, 'since': '%s' % since,
'state': "", 'state': "",
"text": "#access TEST123 %s" % doc.getUid() "text": "#access TEST123 %s" % doc.getUid()
}) },
sort_keys=True,
)
def getBaseExpectedDict(doc): def getBaseExpectedDict(doc):
return _decode_with_json({ return _decode_with_json({
"portal_type": doc.getPortalType(), "portal_type": doc.getPortalType(),
...@@ -267,7 +271,9 @@ class TestSlapOSCloudSlapOSCacheMixin( ...@@ -267,7 +271,9 @@ class TestSlapOSCloudSlapOSCacheMixin(
'since': '%s' % since, 'since': '%s' % since,
'state': "", 'state': "",
"text": "#error TEST123 %s" % doc.getUid() "text": "#error TEST123 %s" % doc.getUid()
}) },
sort_keys=True,
)
def getBaseExpectedDict(doc): def getBaseExpectedDict(doc):
return _decode_with_json({ return _decode_with_json({
"portal_type": doc.getPortalType(), "portal_type": doc.getPortalType(),
...@@ -338,7 +344,9 @@ class TestSlapOSCloudSlapOSCacheMixin( ...@@ -338,7 +344,9 @@ class TestSlapOSCloudSlapOSCacheMixin(
'since': '%s' % since, 'since': '%s' % since,
'state': "", 'state': "",
"text": "#building TEST123 %s" % doc.getUid() "text": "#building TEST123 %s" % doc.getUid()
}) },
sort_keys=True,
)
def getBaseExpectedDict(doc): def getBaseExpectedDict(doc):
return _decode_with_json({ return _decode_with_json({
"portal_type": doc.getPortalType(), "portal_type": doc.getPortalType(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment