@@ -179,7 +179,7 @@ def test_create_lookup_key_index_preserves_structure(setup):
179
179
fields = ["a" , "b" , "c" ]
180
180
181
181
expected_headers = (
182
- '[{"col1":{"type":"str","key":true}},' + '{"col2":{"type":"str"}},{"col3":{"type":"str"}}]'
182
+ '[{"col1":{"type":"str","key":true}},' + '{"col2":{"type":"str"}},{"col3":{"type":"str"}}]'
183
183
)
184
184
with mock .patch .object (lookup , "send_control" , wraps = lookup .send_control ) as lookup_spy :
185
185
lookup .send_headers (headers = headers , key_index = 0 , event = "START" , action = "FULL" )
@@ -204,8 +204,8 @@ def test_send_headers_with_type_of_key(setup):
204
204
headers = ["col1" , "col2" , "col3" ]
205
205
206
206
expected_headers = (
207
- '[{"col1":{"type":"int4","key":true}},'
208
- + '{"col2":{"type":"str"}},{"col3":{"type":"str"}}]'
207
+ '[{"col1":{"type":"int4","key":true}},'
208
+ + '{"col2":{"type":"str"}},{"col3":{"type":"str"}}]'
209
209
)
210
210
with mock .patch .object (lookup , "send_control" , wraps = lookup .send_control ) as lookup_spy :
211
211
lookup .send_headers (
@@ -309,7 +309,7 @@ def test_escape_quotes_in_send_data_line_key(setup):
309
309
310
310
with mock .patch .object (Lookup , "clean_field" , wraps = Lookup .clean_field ) as clean_field :
311
311
lookup .send_data_line (key_index = 0 , fields = ["11" , 'Double quotes"' ])
312
- clean_field .assert_called_with ('Double quotes"' , True )
312
+ clean_field .assert_called_with ('Double quotes"' , True , False )
313
313
314
314
315
315
# Test to make sure escape_quotes is propagated correctly
@@ -325,7 +325,7 @@ def test_escape_quotes_in_send_data_line(setup):
325
325
326
326
with mock .patch .object (Lookup , "clean_field" , wraps = Lookup .clean_field ) as clean_field :
327
327
lookup .send_data_line (key_index = 0 , fields = ["11" , 'Double quotes"' ])
328
- clean_field .assert_called_with ('Double quotes"' , True )
328
+ clean_field .assert_called_with ('Double quotes"' , True , False )
329
329
330
330
# Test to make sure escape_quotes is propagated correctly
331
331
@@ -342,7 +342,7 @@ def test_escape_quotes_in_send_csv(setup):
342
342
343
343
with mock .patch .object (Lookup , "clean_field" , wraps = Lookup .clean_field ) as clean_field :
344
344
lookup .send_csv (path = setup .lookup_file , has_header = True , key = setup .lookup_key )
345
- clean_field .assert_called_with ("ffffff" , True )
345
+ clean_field .assert_called_with ("ffffff" , True , False )
346
346
347
347
# Test to make sure escape_quotes is propagated correctly
348
348
@@ -364,7 +364,7 @@ def test_escape_quotes_in_send_csv_delete_index(setup):
364
364
key = setup .lookup_key ,
365
365
delete_field = "Green" ,
366
366
)
367
- clean_field .assert_called_with ("ffffff" , True )
367
+ clean_field .assert_called_with ("ffffff" , True , False )
368
368
369
369
370
370
if __name__ == "__main__" :
0 commit comments