Did I find the right examples for you? yes no

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/t/u/tuskar-0.4.1/tuskar/tests/db/test_api.py   tuskar(Download)
 
        # Test
        self.assertRaises(exception.OvercloudRoleExists,
                          self.connection.create_overcloud_role,
                          duplicate)
    def test_delete_nonexistent_role(self):
        self.assertRaises(exception.OvercloudRoleNotFound,
                          self.connection.delete_overcloud_role_by_id,
                          'fake-id')
 
    def test_get_overcloud_role_by_id_no_result(self):
        self.assertRaises(exception.OvercloudRoleNotFound,
                          self.connection.get_overcloud_role_by_id,
                          'fake-id')
 
 
        # Test
        self.assertRaises(exception.OvercloudExists,
                          self.connection.create_overcloud,
                          duplicate)
 
        # Test
        self.assertRaises(exception.DuplicateAttribute,
                          self.connection.create_overcloud,
                          self.overcloud_1)