Skip to content

Commit 0038dcc

Browse files
committed
indentation
1 parent f3218c0 commit 0038dcc

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

python-lib/tc_etl_lib/tc_etl_lib/test_object_storage.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def custom_processing_method(chunk):
100100
pass
101101
object_storage_manager = self.init_object_storage_manager()
102102
object_storage_manager.process_file(bucket_name='test-bucket',
103-
file='file',
104-
processing_method=custom_processing_method,
105-
chunk_size=10)
103+
file='file',
104+
processing_method=custom_processing_method,
105+
chunk_size=10)
106106

107107
mock_object_storage_client.get_object.assert_called_once_with(
108108
Bucket='test-bucket', Key='file', Range='bytes=0-9'
@@ -123,6 +123,6 @@ def custom_processing_method(chunk):
123123
with self.assertRaises(Exception):
124124
object_storage_manager = self.init_object_storage_manager()
125125
object_storage_manager.process_file(bucket_name='test-bucket',
126-
file='file',
127-
processing_method=custom_processing_method,
128-
chunk_size=10)
126+
file='file',
127+
processing_method=custom_processing_method,
128+
chunk_size=10)

python-lib/test-etl-lib-object_storage.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@
2222

2323
# declare objectStorageManager
2424
object_storage_manager = tc.objectStorageManager(endpoint='<http/https>://<object_storage_endpoint>:<port>',
25-
access_key='<user>',
26-
secret_key='<password>')
25+
access_key='<user>',
26+
secret_key='<password>')
2727

2828
# Upload test-file.txt to python-test-bucket/output/example.txt
2929
object_storage_manager.upload_file(bucket_name='python-test-bucket',
30-
destination_file='/output/example.txt',
31-
source_file="test-file.txt")
30+
destination_file='/output/example.txt',
31+
source_file="test-file.txt")
3232

3333
# Retrieve example.txt and apply print method to each 3 bytes
3434
object_storage_manager.process_file(bucket_name='python-test-bucket',
35-
file='/output/example.txt',
36-
processing_method=print,
37-
chunk_size=3)
35+
file='/output/example.txt',
36+
processing_method=print,
37+
chunk_size=3)
3838

3939
# Custom method that writes the file chunks in a CSV (he receives and writes bytes)
4040
def customCSVProcessingMethod(file_chunk):
@@ -44,11 +44,11 @@ def customCSVProcessingMethod(file_chunk):
4444

4545
# Upload CSV
4646
object_storage_manager.upload_file(bucket_name='python-test-bucket',
47-
destination_file='/output/reallyBigFile.csv',
48-
source_file="movimientos_padronales_20250822_v2.csv")
47+
destination_file='/output/reallyBigFile.csv',
48+
source_file="movimientos_padronales_20250822_v2.csv")
4949

5050
# Retrieve reallyBigFile.csv and apply customCSVProcessingMethod method to each 1000000 bytes
5151
object_storage_manager.process_file(bucket_name='python-test-bucket',
52-
file='/output/reallyBigFile.csv',
53-
processing_method=customCSVProcessingMethod,
54-
chunk_size=1000000)
52+
file='/output/reallyBigFile.csv',
53+
processing_method=customCSVProcessingMethod,
54+
chunk_size=1000000)

0 commit comments

Comments
 (0)