@@ -51,6 +51,7 @@ def session_constants(self):
5151 "roles" : ["admin" ],
5252 "permissions" : ["read" ],
5353 "entitlements" : ["feature_1" ],
54+ "feature_flags" : ["flag1" , "flag2" ],
5455 "exp" : int (current_datetime .timestamp ()) + 3600 ,
5556 "iat" : int (current_datetime .timestamp ()),
5657 }
@@ -244,6 +245,7 @@ def test_authenticate_success(self, session_constants, mock_user_management):
244245 "roles" : ["admin" ],
245246 "permissions" : ["read" ],
246247 "entitlements" : ["feature_1" ],
248+ "feature_flags" : ["flag1" , "flag2" ],
247249 }
248250
249251 with patch .object (Session , "unseal_data" , return_value = mock_session ), patch (
@@ -263,6 +265,7 @@ def test_authenticate_success(self, session_constants, mock_user_management):
263265 assert response .roles == ["admin" ]
264266 assert response .permissions == ["read" ]
265267 assert response .entitlements == ["feature_1" ]
268+ assert response .feature_flags == ["flag1" , "flag2" ]
266269 assert response .user .id == session_constants ["USER_ID" ]
267270 assert response .impersonator is None
268271
@@ -312,6 +315,7 @@ def test_authenticate_success_with_roles(
312315 "roles" : ["admin" , "member" ],
313316 "permissions" : ["read" , "write" ],
314317 "entitlements" : ["feature_1" ],
318+ "feature_flags" : ["flag1" , "flag2" ],
315319 }
316320
317321 with patch .object (Session , "unseal_data" , return_value = mock_session ), patch (
@@ -331,6 +335,7 @@ def test_authenticate_success_with_roles(
331335 assert response .roles == ["admin" , "member" ]
332336 assert response .permissions == ["read" , "write" ]
333337 assert response .entitlements == ["feature_1" ]
338+ assert response .feature_flags == ["flag1" , "flag2" ]
334339 assert response .user .id == session_constants ["USER_ID" ]
335340 assert response .impersonator is None
336341
@@ -410,6 +415,7 @@ def test_refresh_success(self, session_constants, mock_user_management):
410415 "roles" : ["admin" ],
411416 "permissions" : ["read" ],
412417 "entitlements" : ["feature_1" ],
418+ "feature_flags" : ["flag1" , "flag2" ],
413419 },
414420 ):
415421 response = session .refresh ()
@@ -511,6 +517,7 @@ async def test_refresh_success(self, session_constants, mock_user_management):
511517 "roles" : ["admin" ],
512518 "permissions" : ["read" ],
513519 "entitlements" : ["feature_1" ],
520+ "feature_flags" : ["flag1" , "flag2" ],
514521 },
515522 ):
516523 response = await session .refresh ()
0 commit comments