- tasks.mgr.dashboard.test_role
- tasks.mgr.dashboard.test_settings
- tasks.mgr.dashboard.test_user
+ - tasks.mgr.dashboard.test_erasure_code_profile
def reset_session(cls):
cls._session = requests.Session()
+ def assertSubset(self, data, biggerData):
+ for key, value in data.items():
+ self.assertEqual(biggerData[key], value)
+
def assertJsonBody(self, data):
body = self._resp.json()
self.assertEqual(body, data)
+ def assertJsonSubset(self, data):
+ self.assertSubset(data, self._resp.json())
+
def assertSchema(self, data, schema):
try:
return _validate_json(data, schema)
}
if 'crush-failure-domain' in default[0]:
default_ecp['crush-failure-domain'] = default[0]['crush-failure-domain']
- self.assertEqual(default[0], default_ecp)
+ self.assertSubset(default_ecp, default[0])
get_data = self._get('/api/erasure_code_profile/default')
self.assertEqual(get_data, default[0])
self.assertStatus(201)
self._get('/api/erasure_code_profile/ecp32')
- self.assertJsonBody({
+ self.assertJsonSubset({
'crush-device-class': '',
'crush-failure-domain': 'osd',
'crush-root': 'default',
'name': 'ecp32',
'plugin': 'jerasure',
'technique': 'reed_sol_van',
- 'w': '8'
})
self.assertStatus(200)