github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/python/test/test_commit_list.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.commit_list import CommitList  # noqa: E501
    21  from lakefs_sdk.rest import ApiException
    22  
    23  class TestCommitList(unittest.TestCase):
    24      """CommitList 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 CommitList
    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 `CommitList`
    38          """
    39          model = lakefs_sdk.models.commit_list.CommitList()  # noqa: E501
    40          if include_optional :
    41              return CommitList(
    42                  pagination = lakefs_sdk.models.pagination.Pagination(
    43                      has_more = True, 
    44                      next_offset = '', 
    45                      results = 0, 
    46                      max_per_page = 0, ), 
    47                  results = [
    48                      lakefs_sdk.models.commit.Commit(
    49                          id = '', 
    50                          parents = [
    51                              ''
    52                              ], 
    53                          committer = '', 
    54                          message = '', 
    55                          creation_date = 56, 
    56                          meta_range_id = '', 
    57                          metadata = {
    58                              'key' : ''
    59                              }, 
    60                          generation = 56, 
    61                          version = 0, )
    62                      ]
    63              )
    64          else :
    65              return CommitList(
    66                  pagination = lakefs_sdk.models.pagination.Pagination(
    67                      has_more = True, 
    68                      next_offset = '', 
    69                      results = 0, 
    70                      max_per_page = 0, ),
    71                  results = [
    72                      lakefs_sdk.models.commit.Commit(
    73                          id = '', 
    74                          parents = [
    75                              ''
    76                              ], 
    77                          committer = '', 
    78                          message = '', 
    79                          creation_date = 56, 
    80                          meta_range_id = '', 
    81                          metadata = {
    82                              'key' : ''
    83                              }, 
    84                          generation = 56, 
    85                          version = 0, )
    86                      ],
    87          )
    88          """
    89  
    90      def testCommitList(self):
    91          """Test CommitList"""
    92          # inst_req_only = self.make_instance(include_optional=False)
    93          # inst_req_and_optional = self.make_instance(include_optional=True)
    94  
    95  if __name__ == '__main__':
    96      unittest.main()