From a380f1137b589c456d13dbfbb9c5c75204f21735 Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Wed, 18 Oct 2023 16:33:29 -0400 Subject: [PATCH] fix: test update for edx-drf-extensions 8.11.0 The method generate_unversioned_payload in edx-drf-extensions now requires a user.id to function, so that needed to be added to the mock user. --- ecommerce/tests/mixins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ecommerce/tests/mixins.py b/ecommerce/tests/mixins.py index a03154b06d6..349c6f11e0b 100644 --- a/ecommerce/tests/mixins.py +++ b/ecommerce/tests/mixins.py @@ -137,6 +137,7 @@ def generate_new_user_token(self, username, email, is_staff): # create a mock user, and not the actual user, because we want to confirm that # the user is created during JWT authentication user = Mock() + user.id = 1 user.username = username user.email = email user.is_staff = is_staff