1-
2- import pytest
31from weaviate .collections .classes .config_methods import _collection_configs_simple_from_json
42
3+
54def test_collection_config_simple_from_json_with_none_vectorizer_config () -> None :
65 """Test that _collection_configs_simple_from_json handles None vectorizer config."""
76 schema = {
@@ -10,9 +9,7 @@ def test_collection_config_simple_from_json_with_none_vectorizer_config() -> Non
109 "class" : "TestCollection" ,
1110 "vectorConfig" : {
1211 "default" : {
13- "vectorizer" : {
14- "text2vec-transformers" : None
15- },
12+ "vectorizer" : {"text2vec-transformers" : None },
1613 "vectorIndexType" : "hnsw" ,
1714 "vectorIndexConfig" : {
1815 "skip" : False ,
@@ -25,15 +22,15 @@ def test_collection_config_simple_from_json_with_none_vectorizer_config() -> Non
2522 "dynamicEfFactor" : 8 ,
2623 "vectorCacheMaxObjects" : 1000000000000 ,
2724 "flatSearchCutoff" : 40000 ,
28- "distance" : "cosine"
29- }
25+ "distance" : "cosine" ,
26+ },
3027 }
3128 },
3229 "properties" : [],
3330 "invertedIndexConfig" : {
34- "bm25" : {"b" : 0.75 , "k1" : 1.2 },
35- "cleanupIntervalSeconds" : 60 ,
36- "stopwords" : {"preset" : "en" , "additions" : None , "removals" : None }
31+ "bm25" : {"b" : 0.75 , "k1" : 1.2 },
32+ "cleanupIntervalSeconds" : 60 ,
33+ "stopwords" : {"preset" : "en" , "additions" : None , "removals" : None },
3734 },
3835 "replicationConfig" : {"factor" : 1 , "deletionStrategy" : "NoAutomatedResolution" },
3936 "shardingConfig" : {
@@ -44,7 +41,7 @@ def test_collection_config_simple_from_json_with_none_vectorizer_config() -> Non
4441 "actualVirtualCount" : 128 ,
4542 "key" : "_id" ,
4643 "strategy" : "hash" ,
47- "function" : "murmur3"
44+ "function" : "murmur3" ,
4845 },
4946 "vectorIndexType" : "hnsw" ,
5047 "vectorIndexConfig" : {
@@ -58,8 +55,8 @@ def test_collection_config_simple_from_json_with_none_vectorizer_config() -> Non
5855 "dynamicEfFactor" : 8 ,
5956 "vectorCacheMaxObjects" : 1000000000000 ,
6057 "flatSearchCutoff" : 40000 ,
61- "distance" : "cosine"
62- }
58+ "distance" : "cosine" ,
59+ },
6360 }
6461 ]
6562 }
0 commit comments