Ejemplo n.º 1
0
 def test_testrun(self):
     testrun_output = StringIO()
     mfg_inspector.OutputToTestRunProto(testrun_output)(self.record)
     if self.UPDATE_OUTPUT:
         with open(_local_filename('record.testrun'), 'wb') as testrunfile:
             testrunfile.write(testrun_output.getvalue())
     else:
         actual = test_runs_pb2.TestRun.FromString(
             testrun_output.getvalue())
         self.assertTrue(
             data.equals_log_diff(text_format.MessageToString(self.testrun),
                                  text_format.MessageToString(actual)))
Ejemplo n.º 2
0
 def test_testrun(self, user_mock):
     user_mock.prompt.return_value = 'SomeWidget'
     record = yield self._test
     testrun_output = BytesIO()
     mfg_inspector.OutputToTestRunProto(testrun_output)(record)