@@ -70,14 +70,13 @@ def test_create_user_from_context_with_user_id_attribute(self):
7070 # Test 2: Priority order - targeting_key > user_id > userId
7171 context = EvaluationContext (
7272 targeting_key = targeting_key_id ,
73- attributes = {"user_id" : user_id , "userId" : user_id_attr }
73+ attributes = {"user_id" : user_id , "userId" : user_id_attr },
7474 )
7575 user = DevCycleUser .create_user_from_context (context )
7676 self .assertEqual (user .user_id , targeting_key_id )
7777
7878 context = EvaluationContext (
79- targeting_key = None ,
80- attributes = {"user_id" : user_id , "userId" : user_id_attr }
79+ targeting_key = None , attributes = {"user_id" : user_id , "userId" : user_id_attr }
8180 )
8281 user = DevCycleUser .create_user_from_context (context )
8382 self .assertEqual (user .user_id , user_id )
@@ -102,7 +101,12 @@ def test_create_user_from_context_user_id_exclusion(self):
102101 # Test exclusion when targeting_key is used
103102 context = EvaluationContext (
104103 targeting_key = targeting_key_id ,
105- attributes = {"user_id" : user_id , "userId" : user_id_attr , "targeting_key" : "should-be-excluded" , "other_field" : "value" }
104+ attributes = {
105+ "user_id" : user_id ,
106+ "userId" : user_id_attr ,
107+ "targeting_key" : "should-be-excluded" ,
108+ "other_field" : "value" ,
109+ },
106110 )
107111 user = DevCycleUser .create_user_from_context (context )
108112 self .assertEqual (user .user_id , targeting_key_id )
@@ -115,7 +119,11 @@ def test_create_user_from_context_user_id_exclusion(self):
115119 # Test exclusion when user_id is used
116120 context = EvaluationContext (
117121 targeting_key = None ,
118- attributes = {"user_id" : user_id , "userId" : user_id_attr , "other_field" : "value" }
122+ attributes = {
123+ "user_id" : user_id ,
124+ "userId" : user_id_attr ,
125+ "other_field" : "value" ,
126+ },
119127 )
120128 user = DevCycleUser .create_user_from_context (context )
121129 self .assertEqual (user .user_id , user_id )
@@ -127,7 +135,7 @@ def test_create_user_from_context_user_id_exclusion(self):
127135 # Test exclusion when userId is used
128136 context = EvaluationContext (
129137 targeting_key = None ,
130- attributes = {"userId" : user_id_attr , "other_field" : "value" }
138+ attributes = {"userId" : user_id_attr , "other_field" : "value" },
131139 )
132140 user = DevCycleUser .create_user_from_context (context )
133141 self .assertEqual (user .user_id , user_id_attr )
0 commit comments