Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
batrick committed Oct 18, 2024
1 parent 2c5f844 commit c899f35
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion teuthology/suite/test/test_run_.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import os
import pytest
import requests
Expand All @@ -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
Expand Down Expand Up @@ -314,10 +316,24 @@ 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
#kwargs = m_schedule_jobs.call_args.kwargs
#log.info("calls=\n%s", m_schedule_jobs.mock_calls)
c = m_schedule_jobs.mock_calls[0]
log.info("call =\n%s", c)
log.info("0 =\n%s", c[0])
log.info("1 =\n%s", c[1])
log.info("2 =\n%s", c[2])
#kwargs = c.kwargs
kwargs = c[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'])
stdin_yaml = yaml.safe_load(kwargs['stdin'])
for k in y:
assert y[k] == stdin_yaml[k]
Expand Down

0 comments on commit c899f35

Please sign in to comment.