def test_update_message(): under_test1 = CommandStatus("job_id1", "command_id1") under_test2 = CommandStatus("job_id1", "command_id1") test_msg = "some test message" under_test1.message = test_msg assert under_test2.message == "" under_test2.update_status(under_test1) # No exception assert under_test2.message == test_msg
def test_update_success(): under_test1 = CommandStatus("job_id1", "command_id1") under_test2 = CommandStatus("job_id1", "command_id1") under_test2.update_status(under_test1) # No exception
def test_update_failure(): under_test1 = CommandStatus("job_id1", "command_id1") under_test2 = CommandStatus("job_id1", "command_id2") with pytest.raises(RuntimeError): under_test2.update_status(under_test1)