github.com/kubeflow/training-operator@v1.7.0/sdk/python/test/test_kubeflow_org_v1_paddle_job.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_paddle_job import KubeflowOrgV1PaddleJob  # noqa: E501
    20  from kubeflow.training.rest import ApiException
    21  
    22  class TestKubeflowOrgV1PaddleJob(unittest.TestCase):
    23      """KubeflowOrgV1PaddleJob 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 KubeflowOrgV1PaddleJob
    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_paddle_job.KubeflowOrgV1PaddleJob()  # noqa: E501
    37          if include_optional :
    38              return KubeflowOrgV1PaddleJob(
    39                  api_version = '0', 
    40                  kind = '0', 
    41                  metadata = None, 
    42                  spec = kubeflow_org_v1_paddle_job_spec.KubeflowOrgV1PaddleJobSpec(
    43                      elastic_policy = kubeflow_org_v1_paddle_elastic_policy.KubeflowOrgV1PaddleElasticPolicy(
    44                          max_replicas = 56, 
    45                          max_restarts = 56, 
    46                          metrics = [
    47                              None
    48                              ], 
    49                          min_replicas = 56, ), 
    50                      paddle_replica_specs = {
    51                          'key' : kubeflow_org_v1_replica_spec.KubeflowOrgV1ReplicaSpec(
    52                              replicas = 56, 
    53                              restart_policy = '0', 
    54                              template = None, )
    55                          }, 
    56                      run_policy = kubeflow_org_v1_run_policy.KubeflowOrgV1RunPolicy(
    57                          active_deadline_seconds = 56, 
    58                          backoff_limit = 56, 
    59                          clean_pod_policy = '0', 
    60                          scheduling_policy = kubeflow_org_v1_scheduling_policy.KubeflowOrgV1SchedulingPolicy(
    61                              min_available = 56, 
    62                              min_resources = {
    63                                  'key' : None
    64                                  }, 
    65                              priority_class = '0', 
    66                              queue = '0', 
    67                              schedule_timeout_seconds = 56, ), 
    68                          suspend = True, 
    69                          ttl_seconds_after_finished = 56, ), ), 
    70                  status = kubeflow_org_v1_job_status.KubeflowOrgV1JobStatus(
    71                      completion_time = None, 
    72                      conditions = [
    73                          kubeflow_org_v1_job_condition.KubeflowOrgV1JobCondition(
    74                              last_transition_time = None, 
    75                              last_update_time = None, 
    76                              message = '0', 
    77                              reason = '0', 
    78                              status = '0', 
    79                              type = '0', )
    80                          ], 
    81                      last_reconcile_time = None, 
    82                      replica_statuses = {
    83                          'key' : kubeflow_org_v1_replica_status.KubeflowOrgV1ReplicaStatus(
    84                              active = 56, 
    85                              failed = 56, 
    86                              label_selector = None, 
    87                              selector = '0', 
    88                              succeeded = 56, )
    89                          }, 
    90                      start_time = None, )
    91              )
    92          else :
    93              return KubeflowOrgV1PaddleJob(
    94          )
    95  
    96      def testKubeflowOrgV1PaddleJob(self):
    97          """Test KubeflowOrgV1PaddleJob"""
    98          inst_req_only = self.make_instance(include_optional=False)
    99          inst_req_and_optional = self.make_instance(include_optional=True)
   100  
   101  
   102  if __name__ == '__main__':
   103      unittest.main()