def testdisplayTransaction_prints_the_transaction(self): with\ Autowired('UiTestData',self),\ Autowired('AiTestData',self),\ unittest.mock.patch('sys.stdout') as mockedStdout: displayAccuracyService.call(self.AiTestData.ACCURACY) TestHelper.assertPrintedOn( mockedStdout, self.UiTestData.ACCURACY_STRING.format(self.AiTestData.ACCURACY))
def test_displayOption_displays_choice_number_probability_and_categories( self): with\ Autowired('UpdateTestData', self),\ unittest.mock.patch('sys.stdout') as mockedStdout: optionDisplayService.call( self.UpdateTestData.resultKeys[0], self.UpdateTestData.data.problemValues[0][2], self.UpdateTestData.categories[3]) TestHelper.assertPrintedOn(mockedStdout, self.UpdateTestData.outputOfFirstOption)
def testdisplayTransaction_prints_the_transaction(self): with\ Autowired('DbTestData', self),\ MockedService('sys.stdout') as mockedStdout: transactionDisplayService.call(self.DbTestData.fetched_row) TestHelper.assertPrintedOn(mockedStdout, self.DbTestData.fetched_row)
def it_displays_the_transaction(self): with\ Autowired('UiTestData', self),\ MockedService('sys.stdout') as mockedStdout: accuracyErrorDisplayService.displayAccurracyError() TestHelper.assertPrintedOn(mockedStdout, self.UiTestData.ACCURACY_ERROR_MESSAGE)