Skip to content

Commit 9b8be8e

Browse files
committed
Fix type for empty mapping
1 parent d34474b commit 9b8be8e

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

tests/test_fields.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_init_integer_field(self, style: XLSXStyle, original_value, cleaned_valu
108108
value=original_value,
109109
field=IntegerField(),
110110
style=style,
111-
mapping=None,
111+
mapping="",
112112
cell_style=style,
113113
)
114114
assert f.key == "age"
@@ -136,7 +136,7 @@ def test_init_float_field(self, style: XLSXStyle, original_value, cleaned_value)
136136
value=original_value,
137137
field=FloatField(),
138138
style=style,
139-
mapping=None,
139+
mapping="",
140140
cell_style=style,
141141
)
142142
assert f.key == "temperature"
@@ -168,7 +168,7 @@ def test_init_decimal_field(self, style: XLSXStyle, original_value, cleaned_valu
168168
value=original_value,
169169
field=DecimalField(max_digits=10, decimal_places=2),
170170
style=style,
171-
mapping=None,
171+
mapping="",
172172
cell_style=style,
173173
)
174174
assert f.key == "price"
@@ -181,7 +181,7 @@ def test_cell_integer(self, style: XLSXStyle, worksheet: Worksheet):
181181
value=42,
182182
field=IntegerField(),
183183
style=style,
184-
mapping=None,
184+
mapping="",
185185
cell_style=style,
186186
)
187187
cell = f.cell(worksheet, 1, 1)
@@ -195,7 +195,7 @@ def test_cell_float(self, style: XLSXStyle, worksheet: Worksheet):
195195
value=35.5,
196196
field=FloatField(),
197197
style=style,
198-
mapping=None,
198+
mapping="",
199199
cell_style=style,
200200
)
201201
cell = f.cell(worksheet, 1, 1)
@@ -227,7 +227,7 @@ def test_init_datetime_field(self, style: XLSXStyle, original_value, cleaned_val
227227
value=original_value,
228228
field=DateTimeField(),
229229
style=style,
230-
mapping=None,
230+
mapping="",
231231
cell_style=style,
232232
)
233233
assert f.original_value == original_value
@@ -255,7 +255,7 @@ def test_init_date_field(self, style: XLSXStyle, original_value, cleaned_value):
255255
value=original_value,
256256
field=DateField(),
257257
style=style,
258-
mapping=None,
258+
mapping="",
259259
cell_style=style,
260260
)
261261
assert f.original_value == original_value
@@ -286,7 +286,7 @@ def test_init_time_field(self, style: XLSXStyle, original_value, cleaned_value):
286286
value=original_value,
287287
field=TimeField(),
288288
style=style,
289-
mapping=None,
289+
mapping="",
290290
cell_style=style,
291291
)
292292
assert f.original_value == original_value
@@ -298,7 +298,7 @@ def test_cell_datetime_default_format(self, style: XLSXStyle, worksheet: Workshe
298298
value="2019-03-04T13:15:30",
299299
field=DateTimeField(),
300300
style=style,
301-
mapping=None,
301+
mapping="",
302302
cell_style=style,
303303
)
304304
cell = f.cell(worksheet, 1, 1)
@@ -315,7 +315,7 @@ def test_cell_datetime_custom_format(
315315
value="01-04-2015 05:16:09",
316316
field=DateTimeField(format="%d-%m-%Y %H:%M:%S"),
317317
style=style,
318-
mapping=None,
318+
mapping="",
319319
cell_style=style,
320320
)
321321
cell = f.cell(worksheet, 1, 1)
@@ -329,7 +329,7 @@ def test_cell_date_default_format(self, style: XLSXStyle, worksheet: Worksheet):
329329
value="2018-09-10",
330330
field=DateField(),
331331
style=style,
332-
mapping=None,
332+
mapping="",
333333
cell_style=style,
334334
)
335335
cell = f.cell(worksheet, 1, 1)
@@ -346,7 +346,7 @@ def test_cell_date_custom_format(
346346
value="25/10/2017",
347347
field=DateField(format="%d/%m/%Y"),
348348
style=style,
349-
mapping=None,
349+
mapping="",
350350
cell_style=style,
351351
)
352352
cell = f.cell(worksheet, 1, 1)
@@ -363,7 +363,7 @@ def test_cell_default_separator(self, style: XLSXStyle, worksheet: Worksheet):
363363
value=["foo", "bar", "baz"],
364364
field=ListField(),
365365
style=style,
366-
mapping=None,
366+
mapping="",
367367
cell_style=style,
368368
)
369369
assert f.original_value == f.value == ["foo", "bar", "baz"]
@@ -378,7 +378,7 @@ def test_cell_custom_separator(self, style: XLSXStyle, worksheet: Worksheet):
378378
value=["john", "doe", "[email protected]"],
379379
field=ListField(),
380380
style=style,
381-
mapping=None,
381+
mapping="",
382382
cell_style=style,
383383
)
384384
assert f.original_value == f.value == ["john", "doe", "[email protected]"]
@@ -393,7 +393,7 @@ def test_cell_complex_types(self, style: XLSXStyle, worksheet: Worksheet):
393393
value=[{"a": 1}, {"b": 2}],
394394
field=ListField(),
395395
style=style,
396-
mapping=None,
396+
mapping="",
397397
cell_style=style,
398398
)
399399
assert f.original_value == f.value == [{"a": 1}, {"b": 2}]
@@ -413,7 +413,7 @@ def test_cell_default_display(
413413
value=value,
414414
field=BooleanField(),
415415
style=style,
416-
mapping=None,
416+
mapping="",
417417
cell_style=style,
418418
)
419419
cell = f.cell(worksheet, 1, 1)
@@ -440,7 +440,7 @@ def test_cell_custom_display(
440440
value=original_value,
441441
field=BooleanField(),
442442
style=style,
443-
mapping=None,
443+
mapping="",
444444
cell_style=style,
445445
)
446446
cell = f.cell(worksheet, 1, 1)

0 commit comments

Comments
 (0)