Esempio n. 1
0
 def test_delete_host_extra_capability(self):
     db_api.host_extra_capability_create(
         _get_fake_host_extra_capabilities(id='1'))
     db_api.host_extra_capability_destroy('1')
     self.assertEqual(None, db_api.host_extra_capability_get('1'))
     self.assertRaises(db_exceptions.ClimateDBNotFound,
                       db_api.host_extra_capability_destroy, '1')
Esempio n. 2
0
 def test_delete_host_extra_capability(self):
     db_api.host_extra_capability_create(
         _get_fake_host_extra_capabilities(id='1'))
     db_api.host_extra_capability_destroy('1')
     self.assertEqual(None, db_api.host_extra_capability_get('1'))
     self.assertRaises(db_exceptions.ClimateDBNotFound,
                       db_api.host_extra_capability_destroy, '1')
Esempio n. 3
0
 def test_delete_host_extra_capability(self):
     db_api.host_extra_capability_create(_get_fake_host_extra_capabilities(id="1"))
     db_api.host_extra_capability_destroy("1")
     self.assertEqual(None, db_api.host_extra_capability_get("1"))
     self.assertRaises(RuntimeError, db_api.host_extra_capability_destroy, "1")
Esempio n. 4
0
 def test_update_host_extra_capability(self):
     db_api.host_extra_capability_create(_get_fake_host_extra_capabilities(id="1"))
     db_api.host_extra_capability_update("1", {"capability_value": "2"})
     res = db_api.host_extra_capability_get("1")
     self.assertEqual("2", res["capability_value"])
Esempio n. 5
0
 def test_get_host_extra_capability_per_id(self):
     db_api.host_extra_capability_create(_get_fake_host_extra_capabilities(id="1"))
     result = db_api.host_extra_capability_get("1")
     self.assertEqual("1", result["id"])
Esempio n. 6
0
 def test_update_host_extra_capability(self):
     db_api.host_extra_capability_create(
         _get_fake_host_extra_capabilities(id='1'))
     db_api.host_extra_capability_update('1', {'capability_value': '2'})
     res = db_api.host_extra_capability_get('1')
     self.assertEqual('2', res['capability_value'])
Esempio n. 7
0
 def test_get_host_extra_capability_per_id(self):
     db_api.host_extra_capability_create(
         _get_fake_host_extra_capabilities(id='1'))
     result = db_api.host_extra_capability_get('1')
     self.assertEqual('1', result['id'])
Esempio n. 8
0
 def test_update_host_extra_capability(self):
     db_api.host_extra_capability_create(
         _get_fake_host_extra_capabilities(id='1'))
     db_api.host_extra_capability_update('1', {'capability_value': '2'})
     res = db_api.host_extra_capability_get('1')
     self.assertEqual('2', res['capability_value'])
Esempio n. 9
0
 def test_get_host_extra_capability_per_id(self):
     db_api.host_extra_capability_create(
         _get_fake_host_extra_capabilities(id='1'))
     result = db_api.host_extra_capability_get('1')
     self.assertEqual('1', result['id'])