def test_transfers_count_vs_all(): assert Transfer.count(status=TransactionStatus.succeeded) == len( list(Transfer.all(status=TransactionStatus.succeeded)) ) assert Transfer.count() == len(list(Transfer.all()))
def test_transfers_all(): transfers = Transfer.all(status=TransactionStatus.succeeded) assert all([tr.status is TransactionStatus.succeeded for tr in transfers])