def test_if_works_for_pod(self):
     definition = {
         'kind': 'Pod',
         'spec': {
             'containers': [
                 {
                     'name': 'nginx-container',
                     'image': 'nginx',
                 },
             ],
         },
     }
     containers = definition_transformers.iterate_container_definitions(definition)
     assert containers == [{'name': 'nginx-container', 'image': 'nginx'}]
 def test_if_works_for_statefulset(self):
     definition = {
         'kind': 'StatefulSet',
         'spec': {
             'template': {
                 'spec': {
                     'containers': [
                         {
                             'name': 'nginx-container',
                             'image': 'nginx',
                         },
                     ],
                 },
             },
         },
     }
     containers = definition_transformers.iterate_container_definitions(definition)
     assert containers == [{'name': 'nginx-container', 'image': 'nginx'}]
 def test_if_works_for_job(self):
     definition = {
         'kind': 'Job',
         'spec': {
             'template': {
                 'spec': {
                     'containers': [
                         {
                             'name': 'python-container',
                             'image': 'python',
                         },
                     ],
                 },
             },
         },
     }
     containers = definition_transformers.iterate_container_definitions(definition)
     assert containers == [{'name': 'python-container', 'image': 'python'}]