Ejemplo n.º 1
0
def stock_asset_sbux(request, db, asset_usd):
    asset = StockAsset.create(
        name="SBUX", code="SBUX", isin="US8552441094", description="Starbucks"
    )
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open("tests/samples/SBUX.csv") as fin:
        for av in import_stock_values(fin, "SBUX", base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 2
0
def stock_asset_nvda(request, db, asset_usd):
    asset = StockAsset.create(
        name="NVDA", code="NVDA", isin="US67066G1040", description="NVIDIA Corporation"
    )
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open("tests/samples/NVDA.csv") as fin:
        for av in import_stock_values(fin, "NVDA", base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 3
0
def stock_asset_amzn(request, db, asset_usd):
    asset = StockAsset.create(
        name="AMZN", code="AMZN", isin="US0231351067", description="Amazon"
    )
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open("tests/samples/AMZN.csv") as fin:
        for av in import_stock_values(fin, "AMZN", base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 4
0
def stock_asset_sbux(request, db, asset_usd):
    asset = StockAsset.create(
        name='SBUX', code='SBUX', isin='US8552441094',
        description='Starbucks')
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open('tests/samples/SBUX.csv') as fin:
        for av in import_stock_values(fin, 'SBUX', base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 5
0
def stock_asset_amzn(request, db, asset_usd):
    asset = StockAsset.create(
        name='AMZN', code='AMZN', isin='US0231351067',
        description='Amazon')
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open('tests/samples/AMZN.csv') as fin:
        for av in import_stock_values(fin, 'AMZN', base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 6
0
def stock_asset_nvda(request, db, asset_usd):
    asset = StockAsset.create(
        name='NVDA', code='NVDA', isin='US67066G1040',
        description='NVIDIA Corporation')
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open('tests/samples/NVDA.csv') as fin:
        for av in import_stock_values(fin, 'NVDA', base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 7
0
def stock_asset_amd(request, db, asset_usd):
    asset = StockAsset.create(
        name='AMD', code='AMD', isin='US0079031078',
        description='Advanced Micro Devices, Inc')
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open('tests/samples/AMD.csv') as fin:
        for av in import_stock_values(fin, 'AMD', base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 8
0
def stock_asset_spy(request, db, asset_usd):
    asset = StockAsset.create(
        name='SPY', code='SPY', isin='US78462F1030',
        description='SPDR S&P 500 ETF Trust Fund')
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open('tests/samples/SPY.csv') as fin:
        for av in import_stock_values(fin, 'SPY', base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 9
0
def stock_asset_amd(request, db, asset_usd):
    asset = StockAsset.create(name='AMD',
                              code='AMD',
                              isin='US0079031078',
                              description='Advanced Micro Devices, Inc')
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open('tests/samples/AMD.csv') as fin:
        for av in import_stock_values(fin, 'AMD', base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset
Ejemplo n.º 10
0
def stock_asset_spy(request, db, asset_usd):
    asset = StockAsset.create(name='SPY',
                              code='SPY',
                              isin='US78462F1030',
                              description='SPDR S&P 500 ETF Trust Fund')
    request.addfinalizer(partial(teardown, db=db, record=asset))

    with open('tests/samples/SPY.csv') as fin:
        for av in import_stock_values(fin, 'SPY', base_asset=asset_usd):
            request.addfinalizer(partial(teardown, db=db, record=av))

    return asset