github.com/kubeflow/training-operator@v1.7.0/sdk/python/test/test_kubeflow_org_v1_job_status.py (about)

     1  # coding: utf-8
     2  
     3  """
     4      Kubeflow Training SDK
     5  
     6      Python SDK for Kubeflow Training  # noqa: E501
     7  
     8      The version of the OpenAPI document: v1.7.0
     9      Generated by: https://openapi-generator.tech
    10  """
    11  
    12  
    13  from __future__ import absolute_import
    14  
    15  import unittest
    16  import datetime
    17  
    18  from kubeflow.training.models import *
    19  from kubeflow.training.models.kubeflow_org_v1_job_status import KubeflowOrgV1JobStatus  # noqa: E501
    20  from kubeflow.training.rest import ApiException
    21  
    22  class TestKubeflowOrgV1JobStatus(unittest.TestCase):
    23      """KubeflowOrgV1JobStatus unit test stubs"""
    24  
    25      def setUp(self):
    26          pass
    27  
    28      def tearDown(self):
    29          pass
    30  
    31      def make_instance(self, include_optional):
    32          """Test KubeflowOrgV1JobStatus
    33              include_option is a boolean, when False only required
    34              params are included, when True both required and
    35              optional params are included """
    36          # model = kubeflow.training.models.kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus()  # noqa: E501
    37          if include_optional :
    38              return KubeflowOrgV1JobStatus(
    39                  completion_time = None, 
    40                  conditions = [
    41                      kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition(
    42                          last_transition_time = None, 
    43                          last_update_time = None, 
    44                          message = '0', 
    45                          reason = '0', 
    46                          status = '0', 
    47                          type = '0', )
    48                      ], 
    49                  last_reconcile_time = None, 
    50                  replica_statuses = {
    51                      'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus(
    52                          active = 56, 
    53                          failed = 56, 
    54                          label_selector = None, 
    55                          selector = '0', 
    56                          succeeded = 56, )
    57                      }, 
    58                  start_time = None
    59              )
    60          else :
    61              return KubeflowOrgV1JobStatus(
    62          )
    63  
    64      def testKubeflowOrgV1JobStatus(self):
    65          """Test KubeflowOrgV1JobStatus"""
    66          inst_req_only = self.make_instance(include_optional=False)
    67          inst_req_and_optional = self.make_instance(include_optional=True)
    68  
    69  
    70  if __name__ == '__main__':
    71      unittest.main()