@@ -288,7 +288,9 @@ def test_property_and_generic_endpoints_agree(
288288 stopwords = config .inverted_index_config .stopwords
289289
290290 text = "the quick brown fox"
291- via_property = recipe_collection .config .tokenize_property (property_name = "recipe" , text = text )
291+ via_property = client .tokenization .for_property (
292+ collection = recipe_collection .name , property_name = "recipe" , text = text
293+ )
292294 via_generic = client .tokenization .text (
293295 text = text ,
294296 tokenization = recipe .tokenization ,
@@ -325,8 +327,9 @@ def test_property_result_shape(self, client: weaviate.WeaviateClient) -> None:
325327 ],
326328 }
327329 )
328- col = client .collections .get ("TestDeserPropTypes" )
329- result = col .config .tokenize_property (property_name = "tag" , text = " Hello World " )
330+ result = client .tokenization .for_property (
331+ collection = "TestDeserPropTypes" , property_name = "tag" , text = " Hello World "
332+ )
330333 assert isinstance (result , TokenizeResult )
331334 assert result .indexed == ["Hello World" ]
332335 finally :
@@ -442,9 +445,8 @@ def test_text_raises_on_old_server(self, client: weaviate.WeaviateClient) -> Non
442445 def test_tokenize_property_raises_on_old_server (self , client : weaviate .WeaviateClient ) -> None :
443446 if client ._connection ._weaviate_version .is_at_least (1 , 37 , 0 ):
444447 pytest .skip ("Version gate only applies to Weaviate < 1.37.0" )
445- col = client .collections .get ("Any" )
446448 with pytest .raises (WeaviateUnsupportedFeatureError ):
447- col . config . tokenize_property ( property_name = "title" , text = "hello" )
449+ client . tokenization . for_property ( collection = "Any" , property_name = "title" , text = "hello" )
448450
449451
450452# ---------------------------------------------------------------------------
@@ -454,7 +456,7 @@ def test_tokenize_property_raises_on_old_server(self, client: weaviate.WeaviateC
454456
455457@pytest .mark .usefixtures ("require_1_37" )
456458class TestAsyncClient :
457- """Verify text() and tokenize_property () work through the async client."""
459+ """Verify tokenization. text() and tokenization.for_property () work through the async client."""
458460
459461 @pytest .mark .asyncio
460462 async def test_text_tokenize (self , async_client : weaviate .WeaviateAsyncClient ) -> None :
@@ -498,8 +500,8 @@ async def test_property_tokenize(self, async_client: weaviate.WeaviateAsyncClien
498500 ],
499501 }
500502 )
501- col = async_client .collections . get ( "TestAsyncPropTokenize" )
502- result = await col . config . tokenize_property (
503+ result = await async_client .tokenization . for_property (
504+ collection = "TestAsyncPropTokenize" ,
503505 property_name = "title" ,
504506 text = "The quick brown fox" ,
505507 )
0 commit comments