Example #1
0
 def test__remove_useless_orders(self):
     allocation = {'goog': 34, 'aapl': -134, 'useless': 0, 'also': -0}
     new_allocation = portfolio._remove_useless_orders(allocation)
     allocation.pop('useless')
     allocation.pop('also')
     eq_(new_allocation, allocation)
Example #2
0
 def test__remove_useless_orders_nothing_to_do(self):
     allocation = {'goog': 34, 'aapl': -134}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, allocation)
Example #3
0
 def test__remove_useless_orders_empty_orders(self):
     allocation = {}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, {})
Example #4
0
 def test__remove_useless_orders(self):
     allocation = {'goog': 34, 'aapl': -134, 'useless': 0, 'also': -0}
     new_allocation = portfolio._remove_useless_orders(allocation)
     allocation.pop('useless')
     allocation.pop('also')
     eq_(new_allocation, allocation)
Example #5
0
 def test__remove_useless_orders_nothing_to_do(self):
     allocation = {'goog': 34, 'aapl': -134}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, allocation)
Example #6
0
 def test__remove_useless_orders_empty_orders(self):
     allocation = {}
     new_allocation = portfolio._remove_useless_orders(allocation)
     eq_(new_allocation, {})