def test_get_formatted_transactions_desc(): repository = TransactionRepository() repository.add_amount('1234567890123458', 1) repository.add_amount('1234567890123457', 1) repository.add_amount('1234567890123456', 1) assert list(repository.get_formatted_transactions()) == [ (1234567890123456, 1.0), (1234567890123457, 1.0), (1234567890123458, 1.0) ]
def test_get_formatted_transactions_desc(): repository = TransactionRepository() repository.add_amount('1234567890123458', 1) repository.add_amount('1234567890123457', 1) repository.add_amount('1234567890123456', 1) assert list(repository.get_formatted_transactions()) == [ (1234567890123456, 1.0), (1234567890123457, 1.0), (1234567890123458, 1.0) ]
def test_get_formatted_transactions_randomly(): repository = TransactionRepository() repository.add_amount('2', 1) repository.add_amount('3', 1) repository.add_amount('5', 1) repository.add_amount('13', 1) repository.add_amount('11', 1) repository.add_amount('7', 1) repository.add_amount('31', 1) repository.add_amount('41', 1) repository.add_amount('43', 1) repository.add_amount('2', 1) repository.add_amount('3', 1) repository.add_amount('5', 1) assert list(repository.get_formatted_transactions()) == [ (2, 2), (3, 2), (5, 2), (7, 1), (11, 1), (13, 1), (31, 1), (41, 1), (43, 1) ]
def test_get_formatted_transactions_randomly(): repository = TransactionRepository() repository.add_amount('2', 1) repository.add_amount('3', 1) repository.add_amount('5', 1) repository.add_amount('13', 1) repository.add_amount('11', 1) repository.add_amount('7', 1) repository.add_amount('31', 1) repository.add_amount('41', 1) repository.add_amount('43', 1) repository.add_amount('2', 1) repository.add_amount('3', 1) repository.add_amount('5', 1) assert list(repository.get_formatted_transactions()) == [(2, 2), (3, 2), (5, 2), (7, 1), (11, 1), (13, 1), (31, 1), (41, 1), (43, 1)]