def testWaterfallLayout(self): """Make sure that watefall_layout_dump.txt is kept current.""" with self.OutputCapturer() as output: cros_show_waterfall_layout.main(['--format', 'text']) new_dump = output.GetStdout() old_dump = osutils.ReadFile(constants.WATERFALL_CONFIG_FILE) self.assertTrue( new_dump == old_dump, 'waterfall_layout_dump.txt does not match the ' 'configs defined in chromeos_config.py. Run ' 'bin/cros_show_waterfall_layout > cbuildbot/waterfall_layout_dump.txt')
def testTextDump(self): """Make sure text dumping is capable of being produced.""" with self.OutputCapturer() as output: cros_show_waterfall_layout.main(['--format', 'text']) self.assertFalse(not output.GetStdout())
def testJSONDumpLoadable(self): """Make sure config export functionality works.""" with self.OutputCapturer() as output: cros_show_waterfall_layout.main(['--format', 'json']) layout = json.loads(output.GetStdout()) self.assertFalse(not layout)