github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python/test/test_meta_range_creation.py (about) 1 # coding: utf-8 2 3 """ 4 lakeFS API 5 6 lakeFS HTTP API 7 8 The version of the OpenAPI document: 1.0.0 9 Contact: services@treeverse.io 10 Generated by OpenAPI Generator (https://openapi-generator.tech) 11 12 Do not edit the class manually. 13 """ # noqa: E501 14 15 16 import unittest 17 import datetime 18 19 import lakefs_sdk 20 from lakefs_sdk.models.meta_range_creation import MetaRangeCreation # noqa: E501 21 from lakefs_sdk.rest import ApiException 22 23 class TestMetaRangeCreation(unittest.TestCase): 24 """MetaRangeCreation unit test stubs""" 25 26 def setUp(self): 27 pass 28 29 def tearDown(self): 30 pass 31 32 def make_instance(self, include_optional): 33 """Test MetaRangeCreation 34 include_option is a boolean, when False only required 35 params are included, when True both required and 36 optional params are included """ 37 # uncomment below to create an instance of `MetaRangeCreation` 38 """ 39 model = lakefs_sdk.models.meta_range_creation.MetaRangeCreation() # noqa: E501 40 if include_optional : 41 return MetaRangeCreation( 42 ranges = [ 43 lakefs_sdk.models.range_metadata.RangeMetadata( 44 id = '480e19972a6fbe98ab8e81ae5efdfd1a29037587e91244e87abd4adefffdb01c', 45 min_key = 'production/collections/some/file_1.parquet', 46 max_key = 'production/collections/some/file_8229.parquet', 47 count = 56, 48 estimated_size = 56, ) 49 ] 50 ) 51 else : 52 return MetaRangeCreation( 53 ranges = [ 54 lakefs_sdk.models.range_metadata.RangeMetadata( 55 id = '480e19972a6fbe98ab8e81ae5efdfd1a29037587e91244e87abd4adefffdb01c', 56 min_key = 'production/collections/some/file_1.parquet', 57 max_key = 'production/collections/some/file_8229.parquet', 58 count = 56, 59 estimated_size = 56, ) 60 ], 61 ) 62 """ 63 64 def testMetaRangeCreation(self): 65 """Test MetaRangeCreation""" 66 # inst_req_only = self.make_instance(include_optional=False) 67 # inst_req_and_optional = self.make_instance(include_optional=True) 68 69 if __name__ == '__main__': 70 unittest.main()