def testSimplest(self): """ module_tested: test description... Function name MUST start with 'test' to be included in the tests. """ result = module_tested.some_function('test_value') expected = 'expected value' assert result == expected
def testSimplest(self): """ module_tested: test description... Function name MUST start with 'test' to be included in the tests. """ # You can access the current request with self.request. It is # injected for you into the test class by moin test framework. result = module_tested.some_function(self.request, 'test_value') expected = 'expected value' assert result == expected
def testSimplest(self): """ module_tested: test description... Function name MUST start with 'test' to be included in the tests. The first line of this docstring will show on the test output: module_tested: test description ... ok """ result = module_tested.some_function('test_value') expected = 'expected value' self.assertEqual(result, expected, ('Expected "%(expected)s" but got "%(result)s"') % locals())
def testSimplest(self): """ module_tested: test description... Function name MUST start with 'test' to be included in the tests. The first line of this docstring will show on the test output: module_tested: test description ... ok """ # You can access the current request with self.request. It is # injected for you into the test class by moin test framework. result = module_tested.some_function(self.request, 'test_value') expected = 'expected value' self.assertEqual(result, expected, ('Expected "%(expected)s" but got "%(result)s"') % locals())