1
#sample test case
class ABC(unittest.TestCase):

    def setUp(self):

        self.driver = webdriver.Firefox()
        self.driver.get("http://testxyz.com")
        ...
    #sample unit test
    def test_A(self):
        driver = self.driver
        a = "CREATE\nTOGGLE DROPDOWN"
        self.assertEquals(a, log)
        ....
        return driver

#sample test case class 2
class XYZ(unittest.TestCase):

    def setUp(self):

        self.driver = webdriver.Firefox()
        self.driver.get("http://testxyz.com")
        ...

    #sample test case function where I would be calling another testcase
    def test_B(self):
        a = ABC()
        a.test_A() #is it possible to call a test case "test_A" here
        ...
        ...

Is it possible to call a test case in a test case. This question is with respect to python selenium unit test.

Right now i'm getting the following error: ValueError: no such test method in 'ABC...

  • http://stackoverflow.com/questions/2090479/valueerror-no-such-test-method-in-class-myapp-tests-sessiontestcase-runtes – Ilia Jun 25 '15 at 19:33

0 Answers0