from allmende_payment_system.models import Account, User def test_user_model(test_db): user = User(username="test", display_name="Test User") test_db.add(user) test_db.commit() assert user.id is not None account = Account(name="Test Account") account.users.append(user) test_db.add(account) test_db.commit() assert len(user.accounts) == 1