diff --git a/teuthology/suite/test/test_run_.py b/teuthology/suite/test/test_run_.py index 754a4bd9e..65c48ec26 100644 --- a/teuthology/suite/test/test_run_.py +++ b/teuthology/suite/test/test_run_.py @@ -1,3 +1,4 @@ +import logging import os import pytest import requests @@ -14,6 +15,7 @@ from teuthology.suite import run from teuthology.util.time import TIMESTAMP_FMT +log = logging.getLogger(__name__) class TestRun(object): klass = run.Run @@ -314,11 +316,32 @@ def test_successful_schedule( desc=os.path.join(self.args.suite, build_matrix_desc), ) + #kwargs = m_schedule_jobs.call_args.kwargs + #log.info("args=\n%s", kwargs['args']) + #log.info("yaml =\n%s", kwargs['stdin']) m_schedule_jobs.assert_has_calls( [call([], [expected_job], runobj.name)], ) - kwargs = m_schedule_jobs.call_kwargs - stdin_yaml = yaml.safe_load(kwargs['stdin']) + args = m_schedule_jobs.call_args.args + log.info("args =\n%s", args) + #og.info("calls=\n%s", m_schedule_jobs.mock_calls) + #c = m_schedule_jobs.mock_calls[0] + #log.info("call =\n%s", c) + #log.info("args = %s", c.args) + #log.info("args = %s", c.kwargs) + #log.info("0 =\n%s", c[0]) + #log.info("1 =\n%s", c[1]) + #log.info("2 =\n%s", c[2]) + #kwargs = c.kwargs + #log.info("10 =\n%s", c[1][0]) + #log.info("101 =\n%s", c[1][0][1]) + #log.info("1010 =\n%s", c[1][0][1][0]) + #kwargs = c[1][0][1][0] # I hate this. + #log.info("kwargs =\n%s", kwargs) + #log.info("args=\n%s", kwargs['args']) + #log.info("yaml =\n%s", kwargs['stdin']) + jobargs = args[1][0] + stdin_yaml = yaml.safe_load(jobargs['stdin']) for k in y: assert y[k] == stdin_yaml[k] for k in teuthology_keys: