89 lines
2.9 KiB
Python
89 lines
2.9 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
mpijob
|
|
|
|
Python SDK for MPI-Operator # noqa: E501
|
|
|
|
The version of the OpenAPI document: v2beta1
|
|
Generated by: https://openapi-generator.tech
|
|
"""
|
|
|
|
|
|
from __future__ import absolute_import
|
|
|
|
import unittest
|
|
import datetime
|
|
|
|
import mpijob
|
|
from mpijob.models.v1_object_meta import V1ObjectMeta # noqa: E501
|
|
from mpijob.rest import ApiException
|
|
|
|
class TestV1ObjectMeta(unittest.TestCase):
|
|
"""V1ObjectMeta unit test stubs"""
|
|
|
|
def setUp(self):
|
|
pass
|
|
|
|
def tearDown(self):
|
|
pass
|
|
|
|
def make_instance(self, include_optional):
|
|
"""Test V1ObjectMeta
|
|
include_option is a boolean, when False only required
|
|
params are included, when True both required and
|
|
optional params are included """
|
|
# model = mpijob.models.v1_object_meta.V1ObjectMeta() # noqa: E501
|
|
if include_optional :
|
|
return V1ObjectMeta(
|
|
annotations = {
|
|
'key' : ''
|
|
},
|
|
creation_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
|
deletion_grace_period_seconds = 56,
|
|
deletion_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
|
|
finalizers = [
|
|
''
|
|
],
|
|
generate_name = '',
|
|
generation = 56,
|
|
labels = {
|
|
'key' : ''
|
|
},
|
|
managed_fields = [
|
|
mpijob.models.v1/managed_fields_entry.v1.ManagedFieldsEntry(
|
|
api_version = '',
|
|
fields_type = '',
|
|
fields_v1 = mpijob.models.fields_v1.fieldsV1(),
|
|
manager = '',
|
|
operation = '',
|
|
subresource = '',
|
|
time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), )
|
|
],
|
|
name = '',
|
|
namespace = '',
|
|
owner_references = [
|
|
mpijob.models.v1/owner_reference.v1.OwnerReference(
|
|
api_version = '',
|
|
block_owner_deletion = True,
|
|
controller = True,
|
|
kind = '',
|
|
name = '',
|
|
uid = '', )
|
|
],
|
|
resource_version = '',
|
|
self_link = '',
|
|
uid = ''
|
|
)
|
|
else :
|
|
return V1ObjectMeta(
|
|
)
|
|
|
|
def testV1ObjectMeta(self):
|
|
"""Test V1ObjectMeta"""
|
|
inst_req_only = self.make_instance(include_optional=False)
|
|
inst_req_and_optional = self.make_instance(include_optional=True)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|