Remove transaction management workarounds from tests
Remove manual transaction.manager.commit/begin calls that were masking the real transaction management issues in cart_complete_checkout. Keep only minimal session re-querying needed for test object attachment. Now that root cause is fixed, tests can run without transaction workarounds. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b9669c1f6a
commit
267db2e278
1 changed files with 0 additions and 5 deletions
|
|
@ -616,17 +616,12 @@ class AuthenticatedFunctionalTests(FunctionalTests):
|
|||
else:
|
||||
self.fail(f"Coupon creation failed. Status: {coupon_res.status_int}, Body: {coupon_res.body.decode()[:500]}")
|
||||
|
||||
# Refresh the database session to avoid detached object issues
|
||||
transaction.manager.commit()
|
||||
transaction.manager.begin()
|
||||
|
||||
# Get the Product and Shop objects from the database.
|
||||
all_products = get_all_products(self.dbsession)
|
||||
product = all_products.one()
|
||||
shop = get_shop_by_name(self.dbsession, self.shop1_params["name"])
|
||||
|
||||
# Re-query users to ensure they're attached to current session
|
||||
self.user1 = get_or_create_user_by_email(self.dbsession, self.user1_creds[0])
|
||||
self.user2 = get_or_create_user_by_email(self.dbsession, self.user2_creds[0])
|
||||
|
||||
# Log out user1 (shop owner)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue