Example #1
0
def test_get_holding_from_position_with_cost():
    assert get_holding_from_position(
        Position(A('10 EUR'), Cost(D('1.23'), 'USD', None, None))) == \
        Holding(None, D('10'), 'EUR', D('1.23'), 'USD', D('12.3'), None, None,
                None)
Example #2
0
def test_get_holding_from_position_without_cost():
    assert get_holding_from_position(Position(A('10 EUR'), None)) == \
        Holding(None, D('10'), 'EUR', None, 'EUR', D('10'), D('10'), None,
                None)