add sorting
This commit is contained in:
parent
bd7a41d9fa
commit
86ba1b0bf1
2 changed files with 136 additions and 7 deletions
|
@ -48,6 +48,25 @@ class CbInvTestCase(object):
|
|||
self.assertEqual(book.quantity_digits, 4)
|
||||
self.assertEqual(book.show_performance, True)
|
||||
|
||||
# run sorter
|
||||
books = Book.search(
|
||||
[],
|
||||
order=[
|
||||
('current_value', 'ASC'),
|
||||
('purchase_amount', 'ASC'),
|
||||
('diff_amount', 'ASC'),
|
||||
('yield_balance', 'ASC'),
|
||||
('diff_percent', 'ASC'),
|
||||
('quantity', 'ASC'),
|
||||
('quantity_all', 'ASC'),
|
||||
('yield_sales', 'ASC'),
|
||||
('yield_sales_12m', 'ASC'),
|
||||
('yield_dividend_total', 'ASC'),
|
||||
('yield_dividend_12m', 'ASC'),
|
||||
('yield_fee_total', 'ASC'),
|
||||
('yield_fee_12m', 'ASC'),
|
||||
])
|
||||
|
||||
@with_transaction()
|
||||
def test_assetbook_aggregated_values(self):
|
||||
""" create cashbooks with hierarchy, add lines,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue