@test.create_stubs({cinder: ('volume_encryption_type_get',
                                 'volume_type_list',)})
    def test_type_encryption_detail_view_encrypted(self):
        volume_type = self.cinder_volume_types.first()
        volume_type.id = u'1'
        volume_type.name = "An Encrypted Volume Name"
        volume_type_list = [volume_type]
        vol_enc_type = self.cinder_volume_encryption_types.list()[0]

        cinder.volume_encryption_type_get(IsA(http.HttpRequest),
                                          volume_type.id)\
            .AndReturn(vol_enc_type)
        cinder.volume_type_list(IsA(http.HttpRequest))\
            .AndReturn(volume_type_list)

        self.mox.ReplayAll()

        url = reverse('horizon:admin:volumes'
                      ':volume_types:type_encryption_detail',
                      args=[volume_type.id])
        res = self.client.get(url)

        self.assertTemplateUsed(
            res,
            'admin/volumes/volume_types/volume_encryption_type_detail.html')

        self.assertContains(res, "<h3>Volume Type Encryption Overview</h3>", 1,
                            200)
        self.assertContains(res, "<dd>%s</dd>" % volume_type.name, 1, 200)
        self.assertContains(res, "<dd>%s</dd>" % vol_enc_type.control_location,
                            1, 200)
        self.assertContains(res, "<dd>%s</dd>" % vol_enc_type.key_size, 1, 200)
        self.assertContains(res, "<dd>%s</dd>" % vol_enc_type.provider, 1, 200)
        self.assertContains(res, vol_enc_type.cipher % "<dd>%s</dd>", 1, 200)

        self.assertNoMessages()
dataset/ETHPy150Open openstack/horizon/openstack_dashboard/dashboards/admin/volumes/volume_types/tests.py/VolumeTypeTests.test_type_encryption_detail_view_encrypted/swapped operands of `%`