def test_transfers_count(): # Count all items count = Transfer.count() assert count == 42 # Count with filters count = Transfer.count(status=TransactionStatus.succeeded) assert count == 4
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_login_token(session): UserLogin.create('222222', session=session) login_token = LoginToken.create(session=session) session.session.headers.pop('X-Cuenca-LoginId') session.configure(login_token=login_token.id) Transfer.count(session=session)