Merge pull request #369 from eReuse/bugfix/test_data_storage
Bugfix/test data storage
This commit is contained in:
commit
7335c04f8e
|
@ -296,6 +296,14 @@ class TestDataStorage(Test):
|
||||||
offline_uncorrectable = Integer(data_key='offlineUncorrectable')
|
offline_uncorrectable = Integer(data_key='offlineUncorrectable')
|
||||||
remaining_lifetime_percentage = Integer(data_key='remainingLifetimePercentage')
|
remaining_lifetime_percentage = Integer(data_key='remainingLifetimePercentage')
|
||||||
|
|
||||||
|
@post_load
|
||||||
|
def default_remaining_lifetime_percentage(self, data):
|
||||||
|
if not data.get('remaining_lifetime_percentage'):
|
||||||
|
return
|
||||||
|
|
||||||
|
if data.get('remaining_lifetime_percentage') > 100:
|
||||||
|
data['remaining_lifetime_percentage'] = None
|
||||||
|
|
||||||
|
|
||||||
class StressTest(Test):
|
class StressTest(Test):
|
||||||
__doc__ = m.StressTest.__doc__
|
__doc__ = m.StressTest.__doc__
|
||||||
|
|
Reference in New Issue