Exemplo n.º 1
0
    def setUpClass(cls):
        # Create a configured API client
        api_client = TestDataUtilities.api_client()

        # Setup required LUSID APIs
        cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(
            api_client)
        cls.portfolios_api = lusid.PortfoliosApi(api_client)
        cls.instruments_api = lusid.InstrumentsApi(api_client)
        cls.aggregation_api = lusid.AggregationApi(api_client)
        cls.quotes_api = lusid.QuotesApi(api_client)
        cls.recipes_api = lusid.ConfigurationRecipeApi(api_client)
        instrument_loader = InstrumentLoader(cls.instruments_api)
        cls.instrument_ids = instrument_loader.load_instruments()

        # Setup test data from utilities
        cls.test_data_utilities = TestDataUtilities(
            cls.transaction_portfolios_api)

        # Set test parameters
        cls.effective_date = datetime(2019, 4, 15, tzinfo=pytz.utc)
        cls.portfolio_code = cls.test_data_utilities.create_transaction_portfolio(
            TestDataUtilities.tutorials_scope)

        # Setup test portfolio
        cls.setup_portfolio(cls.effective_date, cls.portfolio_code)
Exemplo n.º 2
0
 def setUpClass(cls):
     # create a configured API client
     api_client = TestDataUtilities.api_client()
     cls.orders_api = lusid.OrdersApi(api_client)
     cls.instruments_api = lusid.InstrumentsApi(api_client)
     instrument_loader = InstrumentLoader(cls.instruments_api)
     cls.instrument_ids = instrument_loader.load_instruments()
 def setUpClass(cls):
     # create a configured API client
     api_client = TestDataUtilities.api_client()
     cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client)
     cls.instruments_api = lusid.InstrumentsApi(api_client)
     # load instruments from InstrumentLoader
     instrument_loader = InstrumentLoader(cls.instruments_api)
     cls.instrument_ids = instrument_loader.load_instruments()
    def setUpClass(cls):
        # create a configured API client
        api_client = TestDataUtilities.api_client()

        cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(api_client)
        cls.instruments_api = lusid.InstrumentsApi(api_client)

        instrument_loader = InstrumentLoader(cls.instruments_api)
        cls.instrument_ids = instrument_loader.load_instruments()

        cls.test_data_utilities = TestDataUtilities(cls.transaction_portfolios_api)
Exemplo n.º 5
0
    def setUpClass(cls):

        logging.basicConfig(level=logging.INFO)

        # create a configured API client
        api_client = TestDataUtilities.api_client()
        cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client)
        cls.instruments_api = lusid.InstrumentsApi(api_client)

        # load instruments from InstrumentLoader
        instrument_loader = InstrumentLoader(cls.instruments_api)
        cls.instrument_ids = instrument_loader.load_instruments()
        cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
Exemplo n.º 6
0
    def setUpClass(cls):
        # create a configured API client
        api_client = TestDataUtilities.api_client()

        cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(
            api_client)
        cls.reconciliations_api = lusid.ReconciliationsApi(api_client)
        cls.portfolios_api = lusid.PortfoliosApi(api_client)

        instruments_api = lusid.InstrumentsApi(api_client)
        instrument_loader = InstrumentLoader(instruments_api)
        cls.instrument_ids = instrument_loader.load_instruments()

        cls.test_data_utilities = TestDataUtilities(
            cls.transaction_portfolios_api)
        cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)
Exemplo n.º 7
0
    def setUpClass(cls):
        # setup logging configuration
        cls.root_logger = logging.getLogger(__name__)
        cls.root_logger.setLevel(logging.INFO)
        # create a configured API client
        api_client = TestDataUtilities.api_client()
        cls.property_definitions_api = lusid.PropertyDefinitionsApi(api_client)
        cls.instruments_api = lusid.InstrumentsApi(api_client)
        cls.transaction_portfolios_api = lusid.TransactionPortfoliosApi(api_client)
        # load instruments from InstrumentLoader
        instrument_loader = InstrumentLoader(cls.instruments_api)
        cls.instrument_ids = instrument_loader.load_instruments()

        # set test scope and code
        cls.scope = "TransactionProperty"
        cls.code = "TransactionTaxDetail"
Exemplo n.º 8
0
    def setUpClass(cls):
        # create a configured API client
        api_client = TestDataUtilities.api_client()
        cls.id_generator = IdGenerator(scope=TestDataUtilities.tutorials_scope)

        cls.orders_api = lusid.OrdersApi(api_client)
        cls.instruments_api = lusid.InstrumentsApi(api_client)
        cls.properties_api = lusid.PropertyDefinitionsApi(api_client)

        instrument_loader = InstrumentLoader(cls.instruments_api)

        cls.instrument_ids = instrument_loader.load_instruments()
        cls.load_properties(
            properties_api=cls.properties_api,
            id_generator=cls.id_generator,
            scopes=cls.tests_scope.values(),
            codes=cls.test_codes
        )