class SampleTestCase(TestCase): def setUp(self): self.obj = SampleClassToBeTested(6, 3) def testThatNeverFails(self): self.assertTrue def testAddition(self): self.assertEqual(9, self.obj.add()) def testSubstraction(self): self.assertEqual(3, self.obj.sub()) def testMultiplication(self): self.assertEqual(18, self.obj.mult()) def testDivision(self): self.assertEqual(2, self.obj.div())
def setUp(self): self.obj = SampleClassToBeTested(6, 3)