# Path: functionaltests/client/base.py
# CONF = config.get_config()
# class TestCase(BaseTestCase):
#     def setUp(self):
# 
# Path: functionaltests/common/cleanup.py
# class CleanUp(object):
#     def __init__(self, barbicanclient):
#     def delete_all_entities(self):
#     def add_entity(self, entity):
#     def _delete_all_containers(self):
#     def _delete_all_secrets(self):
#     def _delete_all_acls(self):
#     def _delete_all_orders(self):
# 
# Path: functionaltests/utils.py
# class BaseTestCase(oslotest.BaseTestCase):
#     def setUp(self):
#     def tearDown(self):
# def construct_new_test_function(original_func, name, build_params):
#     def test_wrapper(func, test_args, test_kwargs):
#         def wrapper(self):
# def process_parameterized_function(name, func_obj, build_data):
# def parameterized_test_case(cls):
# def parameterized_dataset(build_data):
#     def decorator(func):
# def create_timestamp_w_tz_and_offset(timezone=None, days=0, hours=0, minutes=0,
#                                      seconds=0):
# def get_limit_and_offset_from_ref(ref):
# def get_tomorrow_timestamp():
# def string_to_datetime(datetimestring, date_formats=None):
# def get_id_from_ref(ref):
# 
# Path: barbicanclient/exceptions.py
# class BarbicanException(Exception):
# class PayloadException(BarbicanException):
# class UnsupportedVersion(BarbicanException):
# class HTTPError(Exception):
# class HTTPServerError(HTTPError):
# class HTTPClientError(HTTPError):
# class HTTPAuthError(HTTPError):
#     def __init__(self, message, status_code=0):
#     def __init__(self, message, status_code=401):


import pytz
import sys
from functionaltests.client import base
from functionaltests.common import cleanup
from functionaltests import utils
from oslo_utils import timeutils
from testtools import testcase
from barbicanclient import exceptions
        self.assertEqual(secret_resp.bit_length,
                         order_resp.bit_length,
                         'Bit lengths were not the same')
        self.assertEqual(secret_resp.expiration,
                         order_resp.expiration,
                         'Expirations were not the same')
        self.assertEqual(secret_resp.mode,
                         order_resp.mode,
                         'Modes were not the same')

    @testcase.attr('negative')
    def test_get_order_defaults_that_doesnt_exist(self):
        """Covers case of getting a non-existent order."""
        ref = self.barbicanclient.orders._api.endpoint_override + \
            '/orders/notauuid'
        # try to get a non-existent order
        e = self.assertRaises(ValueError, self.barbicanclient.orders.get, ref)

        # verify that the order get failed
        self.assertEqual('Order incorrectly specified.', str(e))

    @testcase.attr('negative')
    def test_get_order_defaults_that_doesnt_exist_valid_uuid(self):
        """Covers case of getting a non-existent order with a valid UUID"""
        uuid = '54262d9d-4bc7-4821-8df0-dc2ca8e112bb'
        ref = self.barbicanclient.orders._api.endpoint_override + \
            '/orders/' + uuid

        # try to get a non-existent order
        e = self.assertRaises(

# Path: functionaltests/client/base.py
# CONF = config.get_config()
# class TestCase(BaseTestCase):
#     def setUp(self):
# 
# Path: functionaltests/common/cleanup.py
# class CleanUp(object):
#     def __init__(self, barbicanclient):
#     def delete_all_entities(self):
#     def add_entity(self, entity):
#     def _delete_all_containers(self):
#     def _delete_all_secrets(self):
#     def _delete_all_acls(self):
#     def _delete_all_orders(self):
# 
# Path: functionaltests/utils.py
# class BaseTestCase(oslotest.BaseTestCase):
#     def setUp(self):
#     def tearDown(self):
# def construct_new_test_function(original_func, name, build_params):
#     def test_wrapper(func, test_args, test_kwargs):
#         def wrapper(self):
# def process_parameterized_function(name, func_obj, build_data):
# def parameterized_test_case(cls):
# def parameterized_dataset(build_data):
#     def decorator(func):
# def create_timestamp_w_tz_and_offset(timezone=None, days=0, hours=0, minutes=0,
#                                      seconds=0):
# def get_limit_and_offset_from_ref(ref):
# def get_tomorrow_timestamp():
# def string_to_datetime(datetimestring, date_formats=None):
# def get_id_from_ref(ref):
# 
# Path: barbicanclient/exceptions.py
# class BarbicanException(Exception):
# class PayloadException(BarbicanException):
# class UnsupportedVersion(BarbicanException):
# class HTTPError(Exception):
# class HTTPServerError(HTTPError):
# class HTTPClientError(HTTPError):
# class HTTPAuthError(HTTPError):
#     def __init__(self, message, status_code=0):
#     def __init__(self, message, status_code=401):


# Path: functionaltests/client/v1/functional/test_orders.py
import pytz
import sys
from functionaltests.client import base
from functionaltests.common import cleanup
from functionaltests import utils
from oslo_utils import timeutils
from testtools import testcase
from barbicanclient import exceptions

        self.assertEqual(secret_resp.bit_length,
                         order_resp.bit_length,
                         'Bit lengths were not the same')
        self.assertEqual(secret_resp.expiration,
                         order_resp.expiration,
                         'Expirations were not the same')
        self.assertEqual(secret_resp.mode,
                         order_resp.mode,
                         'Modes were not the same')

    @testcase.attr('negative')
    def test_get_order_defaults_that_doesnt_exist(self):
        """Covers case of getting a non-existent order."""
        ref = self.barbicanclient.orders._api.endpoint_override + \
            '/orders/notauuid'
        # try to get a non-existent order
        e = self.assertRaises(ValueError, self.barbicanclient.orders.get, ref)

        # verify that the order get failed
        self.assertEqual('Order incorrectly specified.', str(e))

    @testcase.attr('negative')
    def test_get_order_defaults_that_doesnt_exist_valid_uuid(self):
        """Covers case of getting a non-existent order with a valid UUID"""
        uuid = '54262d9d-4bc7-4821-8df0-dc2ca8e112bb'
        ref = self.barbicanclient.orders._api.endpoint_override + \
            '/orders/' + uuid

        # try to get a non-existent order
        e = self.assertRaises(

            exceptions.HTTPClientError,