Exemplo n.º 1
0
    def test_check_testcase_list_none(self):
        logger = Mock()
        result = dt_run.check_testcase_list(None, logger)

        logger.error.assert_called_once_with(
            'There is no test case to be executed.')
        self.assertEquals(None, result)
Exemplo n.º 2
0
    def test_check_testcase_list(self, mock_testcase):
        testcase_list = ['testcase']
        mock_testcase.testcase_list = testcase_list

        result = dt_run.check_testcase_list(testcase_list)

        self.assertEquals(testcase_list, result)
Exemplo n.º 3
0
    def test_check_testcase_list_not_in_list(self):
        logger = Mock()

        result = dt_run.check_testcase_list(['testcase'], logger)

        logger.error.assert_called_once_with(
            'Test case testcase is not defined.')
        self.assertEquals(None, result)