File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,32 @@ async def test_get_variant_value_respects_runtime_evaluation_rule_not_satisfied(
213213 result = self ._flags .get_variant_value (TEST_FLAG_KEY , "fallback" , context )
214214 assert result == "fallback"
215215
216+ @respx .mock
217+ async def test_get_variant_value_respects_runtime_evaluation_rule_caseinsensitive_values__satisfied (self ):
218+ runtime_eval = {
219+ "==" : [{"var" : "plan" }, "premium" ]
220+ }
221+ flag = create_test_flag (runtime_evaluation_rule = runtime_eval )
222+ await self .setup_flags ([flag ])
223+ context = self .user_context_with_properties ({
224+ "plan" : "PremIum" ,
225+ })
226+ result = self ._flags .get_variant_value (TEST_FLAG_KEY , "fallback" , context )
227+ assert result != "fallback"
228+
229+ @respx .mock
230+ async def test_get_variant_value_respects_runtime_evaluation_rule_caseinsensitive_varnames__satisfied (self ):
231+ runtime_eval = {
232+ "==" : [{"var" : "Plan" }, "premium" ]
233+ }
234+ flag = create_test_flag (runtime_evaluation_rule = runtime_eval )
235+ await self .setup_flags ([flag ])
236+ context = self .user_context_with_properties ({
237+ "plan" : "premium" ,
238+ })
239+ result = self ._flags .get_variant_value (TEST_FLAG_KEY , "fallback" , context )
240+ assert result != "fallback"
241+
216242 @respx .mock
217243 async def test_get_variant_value_respects_runtime_evaluation_rule_contains_satisfied (self ):
218244 runtime_eval = {
You can’t perform that action at this time.
0 commit comments