diff --git a/make_post_sell/tests/test_functional.py b/make_post_sell/tests/test_functional.py index c684c6b..ac21c8f 100644 --- a/make_post_sell/tests/test_functional.py +++ b/make_post_sell/tests/test_functional.py @@ -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)