Fix test_test_data_storage
This commit is contained in:
parent
42c5bee947
commit
a600dd8e54
|
@ -326,7 +326,10 @@ def test_test_data_storage(user: UserClient):
|
||||||
"""Tests a Snapshot with EraseSectors."""
|
"""Tests a Snapshot with EraseSectors."""
|
||||||
s = file('erase-sectors-2-hdd.snapshot')
|
s = file('erase-sectors-2-hdd.snapshot')
|
||||||
snapshot, _ = user.post(res=Snapshot, data=s)
|
snapshot, _ = user.post(res=Snapshot, data=s)
|
||||||
incidence_test = next(ev for ev in snapshot['events'] if ev['reallocatedSectorCount'] == 15)
|
incidence_test = next(
|
||||||
|
ev for ev in snapshot['events']
|
||||||
|
if ev.get('reallocatedSectorCount', None) == 15
|
||||||
|
)
|
||||||
assert incidence_test['incidence']
|
assert incidence_test['incidence']
|
||||||
assert incidence_test['description'] == 'Warning: Drive failure expected soon.'
|
assert incidence_test['description'] == 'Warning: Drive failure expected soon.'
|
||||||
|
|
||||||
|
|
Reference in New Issue