@@ -34,7 +34,7 @@ def test_avro_serializer_config_auto_register_schemas():
3434 """
3535 conf = {'url' : TEST_URL }
3636 test_client = SchemaRegistryClient (conf )
37- test_serializer = AvroSerializer (test_client , "string" ,
37+ test_serializer = AvroSerializer ("string" , test_client ,
3838 conf = {'auto.register.schemas' : False })
3939 assert not test_serializer ._auto_register
4040
@@ -47,7 +47,7 @@ def test_avro_serializer_config_auto_register_schemas_invalid():
4747 test_client = SchemaRegistryClient (conf )
4848
4949 with pytest .raises (ValueError , match = "must be a boolean" ):
50- AvroSerializer (test_client , "string" ,
50+ AvroSerializer ("string" , test_client ,
5151 conf = {'auto.register.schemas' : dict ()})
5252
5353
@@ -60,7 +60,7 @@ def test_avro_serializer_config_auto_register_schemas_false(mock_schema_registry
6060 topic = "test-auto-register"
6161 subject = topic + '-key'
6262
63- test_serializer = AvroSerializer (test_client , "string" ,
63+ test_serializer = AvroSerializer ("string" , test_client ,
6464 conf = {'auto.register.schemas' : False })
6565
6666 test_serializer ("test" ,
@@ -81,7 +81,7 @@ def test_avro_serializer_config_subject_name_strategy():
8181
8282 conf = {'url' : TEST_URL }
8383 test_client = SchemaRegistryClient (conf )
84- test_serializer = AvroSerializer (test_client , "int" ,
84+ test_serializer = AvroSerializer ("int" , test_client ,
8585 conf = {'subject.name.strategy' :
8686 record_subject_name_strategy })
8787
@@ -96,7 +96,7 @@ def test_avro_serializer_config_subject_name_strategy_invalid():
9696 conf = {'url' : TEST_URL }
9797 test_client = SchemaRegistryClient (conf )
9898 with pytest .raises (ValueError , match = "must be callable" ):
99- AvroSerializer (test_client , "int" ,
99+ AvroSerializer ("int" , test_client ,
100100 conf = {'subject.name.strategy' : dict ()})
101101
102102
@@ -106,8 +106,8 @@ def test_avro_serializer_record_subject_name_strategy(load_avsc):
106106 """
107107 conf = {'url' : TEST_URL }
108108 test_client = SchemaRegistryClient (conf )
109- test_serializer = AvroSerializer (test_client ,
110- load_avsc ( 'basic_schema.avsc' ) ,
109+ test_serializer = AvroSerializer (load_avsc ( 'basic_schema.avsc' ) ,
110+ test_client ,
111111 conf = {'subject.name.strategy' :
112112 record_subject_name_strategy })
113113
@@ -123,7 +123,7 @@ def test_avro_serializer_record_subject_name_strategy_primitive(load_avsc):
123123 """
124124 conf = {'url' : TEST_URL }
125125 test_client = SchemaRegistryClient (conf )
126- test_serializer = AvroSerializer (test_client , 'int' ,
126+ test_serializer = AvroSerializer ('int' , test_client ,
127127 conf = {'subject.name.strategy' :
128128 record_subject_name_strategy })
129129
@@ -138,8 +138,8 @@ def test_avro_serializer_topic_record_subject_name_strategy(load_avsc):
138138 """
139139 conf = {'url' : TEST_URL }
140140 test_client = SchemaRegistryClient (conf )
141- test_serializer = AvroSerializer (test_client ,
142- load_avsc ( 'basic_schema.avsc' ) ,
141+ test_serializer = AvroSerializer (load_avsc ( 'basic_schema.avsc' ) ,
142+ test_client ,
143143 conf = {'subject.name.strategy' :
144144 topic_record_subject_name_strategy })
145145
@@ -155,7 +155,8 @@ def test_avro_serializer_topic_record_subject_name_strategy_primitive(load_avsc)
155155 """
156156 conf = {'url' : TEST_URL }
157157 test_client = SchemaRegistryClient (conf )
158- test_serializer = AvroSerializer (test_client , 'int' ,
158+ test_serializer = AvroSerializer ('int' ,
159+ test_client ,
159160 conf = {'subject.name.strategy' :
160161 topic_record_subject_name_strategy })
161162
@@ -170,8 +171,8 @@ def test_avro_serializer_subject_name_strategy_default(load_avsc):
170171 """
171172 conf = {'url' : TEST_URL }
172173 test_client = SchemaRegistryClient (conf )
173- test_serializer = AvroSerializer (test_client ,
174- load_avsc ( 'basic_schema.avsc' ) )
174+ test_serializer = AvroSerializer (load_avsc ( 'basic_schema.avsc' ) ,
175+ test_client )
175176
176177 ctx = SerializationContext ('test_subj' , MessageField .VALUE )
177178 assert test_serializer ._subject_name_func (
0 commit comments