Example #1
0
    def test_update_baymodel_404(self):
        patch_model = datagen.random_baymodel_name_patch_data()

        self.assertRaises(
            exceptions.NotFound,
            self.baymodel_client.patch_baymodel,
            datagen.random_uuid(), patch_model)
Example #2
0
    def test_update_baymodel_invalid_patch(self):
        # get json object
        gen_model = datagen.random_baymodel_data_w_valid_keypair_and_image_id()
        resp, old_model = self._create_baymodel(gen_model)

        bay_model_client = cli.BayModelClient.as_user("default")
        self.assertRaises(exceptions.BadRequest, bay_model_client.patch_baymodel, datagen.random_uuid(), gen_model)
Example #3
0
    def test_update_baymodel_404(self):
        patch_model = datagen.random_baymodel_name_patch_data()

        bay_model_client = cli.BayModelClient.as_user('default')
        self.assertRaises(
            exceptions.NotFound,
            bay_model_client.patch_baymodel,
            datagen.random_uuid(), patch_model)
Example #4
0
    def test_update_baymodel_invalid_patch(self):
        # get json object
        gen_model = datagen.random_baymodel_data_w_valid_keypair_and_image_id()
        resp, old_model = self._create_baymodel(gen_model)

        bay_model_client = cli.BayModelClient.as_user('default')
        self.assertRaises(exceptions.BadRequest,
                          bay_model_client.patch_baymodel,
                          datagen.random_uuid(), gen_model)
Example #5
0
    def test_update_baymodel_invalid_patch(self):
        # get json object
        self.keypairs_client.create_keypair(name='default')
        gen_model = datagen.random_baymodel_data_w_valid_keypair_and_image_id()
        resp, old_model = self._create_baymodel(gen_model)

        self.assertRaises(
            exceptions.BadRequest,
            self.baymodel_client.patch_baymodel, datagen.random_uuid(),
            gen_model)
Example #6
0
 def test_delete_baymodel_404(self):
     self.assertRaises(
         exceptions.NotFound,
         self.baymodel_client.delete_baymodel, datagen.random_uuid())
Example #7
0
 def test_get_baymodel_by_uuid_404(self):
     bay_model_client = cli.BayModelClient.as_user('default')
     self.assertRaises(exceptions.NotFound, bay_model_client.get_baymodel,
                       datagen.random_uuid())
Example #8
0
    def test_update_baymodel_404(self):
        patch_model = datagen.random_baymodel_name_patch_data()

        bay_model_client = cli.BayModelClient.as_user('default')
        self.assertRaises(exceptions.NotFound, bay_model_client.patch_baymodel,
                          datagen.random_uuid(), patch_model)
Example #9
0
 def test_delete_baymodel_404(self):
     bay_model_client = cli.BayModelClient.as_user('default')
     self.assertRaises(
         exceptions.NotFound,
         bay_model_client.delete_baymodel, datagen.random_uuid())
Example #10
0
 def test_get_baymodel_by_uuid_404(self):
     bay_model_client = cli.BayModelClient.as_user("default")
     self.assertRaises(exceptions.NotFound, bay_model_client.get_baymodel, datagen.random_uuid())