@@ -34,7 +34,7 @@ def test_avro_serializer_config_auto_register_schemas():
34
34
"""
35
35
conf = {'url' : TEST_URL }
36
36
test_client = SchemaRegistryClient (conf )
37
- test_serializer = AvroSerializer ("string" , test_client ,
37
+ test_serializer = AvroSerializer (test_client , 'string' ,
38
38
conf = {'auto.register.schemas' : False })
39
39
assert not test_serializer ._auto_register
40
40
@@ -47,7 +47,7 @@ def test_avro_serializer_config_auto_register_schemas_invalid():
47
47
test_client = SchemaRegistryClient (conf )
48
48
49
49
with pytest .raises (ValueError , match = "must be a boolean" ):
50
- AvroSerializer ("string" , test_client ,
50
+ AvroSerializer (test_client , 'string' ,
51
51
conf = {'auto.register.schemas' : dict ()})
52
52
53
53
@@ -60,7 +60,7 @@ def test_avro_serializer_config_auto_register_schemas_false(mock_schema_registry
60
60
topic = "test-auto-register"
61
61
subject = topic + '-key'
62
62
63
- test_serializer = AvroSerializer ("string" , test_client ,
63
+ test_serializer = AvroSerializer (test_client , 'string' ,
64
64
conf = {'auto.register.schemas' : False })
65
65
66
66
test_serializer ("test" ,
@@ -81,7 +81,7 @@ def test_avro_serializer_config_subject_name_strategy():
81
81
82
82
conf = {'url' : TEST_URL }
83
83
test_client = SchemaRegistryClient (conf )
84
- test_serializer = AvroSerializer ("int" , test_client ,
84
+ test_serializer = AvroSerializer (test_client , 'int' ,
85
85
conf = {'subject.name.strategy' :
86
86
record_subject_name_strategy })
87
87
@@ -96,7 +96,7 @@ def test_avro_serializer_config_subject_name_strategy_invalid():
96
96
conf = {'url' : TEST_URL }
97
97
test_client = SchemaRegistryClient (conf )
98
98
with pytest .raises (ValueError , match = "must be callable" ):
99
- AvroSerializer ("int" , test_client ,
99
+ AvroSerializer (test_client , 'int' ,
100
100
conf = {'subject.name.strategy' : dict ()})
101
101
102
102
@@ -106,8 +106,8 @@ def test_avro_serializer_record_subject_name_strategy(load_avsc):
106
106
"""
107
107
conf = {'url' : TEST_URL }
108
108
test_client = SchemaRegistryClient (conf )
109
- test_serializer = AvroSerializer (load_avsc ( 'basic_schema.avsc' ) ,
110
- test_client ,
109
+ test_serializer = AvroSerializer (test_client ,
110
+ load_avsc ( 'basic_schema.avsc' ) ,
111
111
conf = {'subject.name.strategy' :
112
112
record_subject_name_strategy })
113
113
@@ -123,7 +123,7 @@ def test_avro_serializer_record_subject_name_strategy_primitive(load_avsc):
123
123
"""
124
124
conf = {'url' : TEST_URL }
125
125
test_client = SchemaRegistryClient (conf )
126
- test_serializer = AvroSerializer ('int' , test_client ,
126
+ test_serializer = AvroSerializer (test_client , 'int' ,
127
127
conf = {'subject.name.strategy' :
128
128
record_subject_name_strategy })
129
129
@@ -138,8 +138,8 @@ def test_avro_serializer_topic_record_subject_name_strategy(load_avsc):
138
138
"""
139
139
conf = {'url' : TEST_URL }
140
140
test_client = SchemaRegistryClient (conf )
141
- test_serializer = AvroSerializer (load_avsc ( 'basic_schema.avsc' ) ,
142
- test_client ,
141
+ test_serializer = AvroSerializer (test_client ,
142
+ load_avsc ( 'basic_schema.avsc' ) ,
143
143
conf = {'subject.name.strategy' :
144
144
topic_record_subject_name_strategy })
145
145
@@ -155,8 +155,7 @@ def test_avro_serializer_topic_record_subject_name_strategy_primitive(load_avsc)
155
155
"""
156
156
conf = {'url' : TEST_URL }
157
157
test_client = SchemaRegistryClient (conf )
158
- test_serializer = AvroSerializer ('int' ,
159
- test_client ,
158
+ test_serializer = AvroSerializer (test_client , 'int' ,
160
159
conf = {'subject.name.strategy' :
161
160
topic_record_subject_name_strategy })
162
161
@@ -171,8 +170,8 @@ def test_avro_serializer_subject_name_strategy_default(load_avsc):
171
170
"""
172
171
conf = {'url' : TEST_URL }
173
172
test_client = SchemaRegistryClient (conf )
174
- test_serializer = AvroSerializer (load_avsc ( 'basic_schema.avsc' ) ,
175
- test_client )
173
+ test_serializer = AvroSerializer (test_client ,
174
+ load_avsc ( 'basic_schema.avsc' ) )
176
175
177
176
ctx = SerializationContext ('test_subj' , MessageField .VALUE )
178
177
assert test_serializer ._subject_name_func (
0 commit comments