@@ -281,8 +281,7 @@ def test_flex_contains_key_value():
281281 assert box .count () == 5
282282
283283 # Search case-sensitive = False
284- flex : Property = TestEntityFlex .get_property ("flex" )
285- query = box .query (flex .contains_key_value ("k1" , "string" , False )).build ()
284+ query = box .query (TestEntityFlex .flex .contains_key_value ("k1" , "string" , False )).build ()
286285 results = query .find ()
287286 assert len (results ) == 2
288287 assert results [0 ].flex ["k1" ] == "String"
@@ -294,8 +293,7 @@ def test_flex_contains_key_value():
294293 assert results [1 ].flex ["k4" ] == [1 , "foo" , 3 ]
295294
296295 # Search case-sensitive = True
297- flex : Property = TestEntityFlex .get_property ("flex" )
298- query = box .query (flex .contains_key_value ("n1" , "string" , True )).build ()
296+ query = box .query (TestEntityFlex .flex .contains_key_value ("n1" , "string" , True )).build ()
299297 results = query .find ()
300298 assert len (results ) == 1
301299 assert results [0 ].flex ["n1" ] == "string"
@@ -306,13 +304,11 @@ def test_flex_contains_key_value():
306304 # TODO Search using nested key (not supported yet)
307305
308306 # No match (key)
309- flex : Property = TestEntityFlex .get_property ("flex" )
310- query = box .query (flex .contains_key_value ("missing key" , "string" , True )).build ()
307+ query = box .query (TestEntityFlex .flex .contains_key_value ("missing key" , "string" , True )).build ()
311308 assert len (query .find ()) == 0
312309
313310 # No match (value)
314- flex : Property = TestEntityFlex .get_property ("flex" )
315- query = box .query (flex .contains_key_value ("k1" , "missing value" , True )).build ()
311+ query = box .query (TestEntityFlex .flex .contains_key_value ("k1" , "missing value" , True )).build ()
316312 assert len (query .find ()) == 0
317313
318314
0 commit comments