

def test_create_target_EXISTS(self):
    DimensionDataMockHttp.type = 'EXISTS'
    with self.assertRaises(DimensionDataAPIException) as context:
        self.driver.create_target('name', 'e75ead52-692f-4314-8725-c8a4f4d13a87', extra={
            'servicePlan': 'Enterprise',
        })
    context.assertEqual(context.exception.code, 'ERROR')
    self.assertEqual(context.exception.msg, 'Cloud backup for this server is already enabled or being enabled (state: NORMAL).')

dataset/ETHPy150Open apache/libcloud/libcloud/test/backup/test_dimensiondata.py DimensionDataTests.test_create_target_EXISTS/VarMisuse@51/102 `self`->`context`