=================================== FAILURES ===================================
___________ TestJobStatus.test_successful_status_output_no_metadata ____________
self = <test_status.TestJobStatus testMethod=test_successful_status_output_no_metadata>
def test_successful_status_output_no_metadata(self):
"""Test the status command more deeply: in a request with a fully specified
job, it should end up doing a query using getTasksWithoutConfigs."""
mock_context = FakeAuroraCommandContext()
mock_context.add_expected_status_query_result(self.create_status_null_metadata())
with contextlib.nested(
patch('apache.aurora.client.cli.jobs.Job.create_context', return_value=mock_context),
patch('apache.aurora.client.factory.CLUSTERS', new=self.TEST_CLUSTERS)):
cmd = AuroraCommandLine()
cmd.execute(['job', 'status', 'west/bozo/test/hello'])
expected = textwrap.dedent("""\
Active tasks (3):
\tTask:
\t cpus: 2, ram: 2 MB, disk: 2 MB
\t events:
\t 1970-11-23 13:58:46 RUNNING: Hi there
\tTask:
\t cpus: 2, ram: 2 MB, disk: 2 MB
\t events:
\t 1970-11-23 13:58:46 RUNNING: Hi there
\tTask:
\t cpus: 2, ram: 2 MB, disk: 2 MB
\t events:
\t 1970-11-23 13:58:46 RUNNING: Hi there
Inactive tasks (0):
""")
> assert '\n'.join(mock_context.get_out()) == expected
E AssertionError: assert 'Active tasks... tasks (0):\n' == 'Active tasks ... tasks (0):\n'
E Active tasks (3):
E \tTask:
E \t cpus: 2, ram: 2 MB, disk: 2 MB
E \t events:
E - \t 1970-11-23 18:58:46 RUNNING: Hi there
E ? ^
E + \t 1970-11-23 13:58:46 RUNNING: Hi there
E ? ^
E \tTask:
E \t cpus: 2, ram: 2 MB, disk: 2 MB
E \t events:
E - \t 1970-11-23 18:58:46 RUNNING: Hi there
E ? ^
E + \t 1970-11-23 13:58:46 RUNNING: Hi there
E ? ^
E \tTask:
E \t cpus: 2, ram: 2 MB, disk: 2 MB
E \t events:
E - \t 1970-11-23 18:58:46 RUNNING: Hi there
E ? ^
E + \t 1970-11-23 13:58:46 RUNNING: Hi there
E ? ^
E Inactive tasks (0):