Skip to content

Commit

Permalink
Merge pull request #34 from plone/maurits-fix-test15_storageStatistics
Browse files Browse the repository at this point in the history
Fixed sometimes failing test15_storageStatistics.
  • Loading branch information
jensens committed Feb 6, 2016
2 parents 995f39c + 6a97fb7 commit 6955a18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ New:

Fixes:

- *add item here*
- Fixed sometimes failing test. [maurits]


2.2.18 (2015-11-25)
Expand Down
8 changes: 6 additions & 2 deletions Products/CMFEditions/tests/test_ZVCStorageTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ def test15_storageStatistics(self):
'deletedVersions': 0,
'existingVersions': 7,
'deletedHistories': 0,
'time': '0.00',
# time may easily be different
# 'time': '0.00',
'totalVersions': 7,
'existingAverage': '1.8',
'existingHistories': 4,
Expand Down Expand Up @@ -549,7 +550,10 @@ def test15_storageStatistics(self):
'portal_type': 'Dummy',
}]}
self.assertEqual(expected['deleted'], got['deleted'])
self.assertEqual(expected['summaries'], got['summaries'])
self.assertTrue('summaries' in got)
self.assertTrue('time' in got['summaries'])
for key, value in expected['summaries'].items():
self.assertEqual(value, got['summaries'][key])
self.assertEqual(len(expected['existing']), len(got['existing']))
for idx in range(len(expected['existing'])):
exp = expected['existing'][idx]
Expand Down

0 comments on commit 6955a18

Please sign in to comment.