'Ensure volume types get can load qos_specs.'

def test_volume_type_get_with_qos_specs(self):

    qos_data = {'name': 'qos', 'consumer': 'front-end', 'specs': {'key': 'value', 'key2': 'value2'}}
    qos = utils.create_qos(self.ctxt, **qos_data)
    vol_type = db.volume_type_create(self.ctxt, {'name': 'my-vol-type', 'qos_specs_id': qos['id']})
    db_vol_type = db.volume_type_get(self.ctxt, vol_type.id, expected_fields=['qos_specs'])
    expected = {('QoS_Specs_Name', 'qos'), ('consumer', 'front-end'), ('key', 'value'), ('key2', 'value2')}
    actual = {(spec.key, spec.value) for spec in db_vol_type['qos_specs']}
    self.assertEqual(expected, actual)
