Exemple #1
0
    def test_update_baymodel_404(self):
        patch_model = datagen.baymodel_name_patch_data()

        self.assertRaises(
            exceptions.NotFound,
            self.baymodel_client.patch_baymodel,
            data_utils.rand_uuid(), patch_model)
Exemple #2
0
    def test_update_baymodel_by_uuid(self):
        gen_model = datagen.baymodel_data_with_valid_keypair_image_flavor()
        resp, old_model = self._create_baymodel(gen_model)

        patch_model = datagen.baymodel_name_patch_data()
        resp, new_model = self.baymodel_client.patch_baymodel(
            old_model.uuid, patch_model)
        self.assertEqual(200, resp.status)

        resp, model = self.baymodel_client.get_baymodel(new_model.uuid)
        self.assertEqual(200, resp.status)
        self.assertEqual(old_model.uuid, new_model.uuid)
        self.assertEqual(model.name, new_model.name)
Exemple #3
0
    def test_update_baymodel_name_not_found(self):
        patch_model = datagen.baymodel_name_patch_data()

        self.assertRaises(
            exceptions.NotFound,
            self.baymodel_client.patch_baymodel, 'fooo', patch_model)