Skip to content

Commit

Permalink
Update test_cronjob.py
Browse files Browse the repository at this point in the history
Fixing review issues.
  • Loading branch information
FrantzT authored Jul 28, 2020
1 parent 919dfd7 commit 32f7a16
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/k8s/test_cronjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

from k8s.client import NotFound
from k8s.models.common import ObjectMeta
from k8s.models.cronjob import CronJob
from k8s.models.job import Job, JobSpec
from k8s.models.pod import Container, LocalObjectReference, PodTemplateSpec, PodSpec
from k8s.models.cronjob import CronJob, CronJobSpec
from k8s.models.job import JobSpec, JobTemplateSpec
from k8s.models.pod import Container, PodTemplateSpec, PodSpec


NAME = "my-name"
Expand All @@ -39,7 +39,7 @@ def test_create_blank_job(self):

def test_created_if_not_exists(self, post, api_get):
api_get.side_effect = NotFound()
cronjob = _create_default_job()
cronjob = _create_default_cronjob()
call_params = cronjob.as_dict()
post.return_value.json.return_value = call_params

Expand All @@ -49,9 +49,8 @@ def test_created_if_not_exists(self, post, api_get):

pytest.helpers.assert_any_call(post, _uri(NAMESPACE), call_params)


def _create_default_cronjob():
labels = {"test": "true"}
object_meta = ObjectMeta(name=NAME, namespace=NAMESPACE)
container = Container(
name="container",
Expand Down

0 comments on commit 32f7a16

Please sign in to comment.