diff options
Diffstat (limited to 'xtesting/tests/unit')
-rw-r--r-- | xtesting/tests/unit/core/test_robotframework.py | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/xtesting/tests/unit/core/test_robotframework.py b/xtesting/tests/unit/core/test_robotframework.py index bbd99f50..ca681822 100644 --- a/xtesting/tests/unit/core/test_robotframework.py +++ b/xtesting/tests/unit/core/test_robotframework.py @@ -215,11 +215,16 @@ class RunTesting(unittest.TestCase): @mock.patch('robot.run') def _test_makedirs(self, *args): + kwargs = { + 'variable': self.variable, + 'variablefile': self.variablefile, + 'include': self.include + } with mock.patch.object(self.test, 'parse_results') as mock_method, \ mock.patch.object(self.test, 'generate_report', return_value=0) as mmethod: self.assertEqual( - self.test.run(suites=self.suites, variable=self.variable), + self.test.run(suites=self.suites, **kwargs), self.test.EX_OK) args[0].assert_called_once_with( *self.suites, log='NONE', output=self.test.xml_file, @@ -245,10 +250,13 @@ class RunTesting(unittest.TestCase): @mock.patch('os.makedirs') @mock.patch('robot.run') def _test_parse_results(self, status, *args): + kwargs = { + 'variable': self.variable, + 'variablefile': self.variablefile, + 'include': self.include + } self.assertEqual( - self.test.run( - suites=self.suites, variable=self.variable, - variablefile=self.variablefile, include=self.include), + self.test.run(suites=self.suites, **kwargs), status) args[0].assert_called_once_with( *self.suites, log='NONE', output=self.test.xml_file, @@ -275,11 +283,14 @@ class RunTesting(unittest.TestCase): @mock.patch('os.makedirs') @mock.patch('robot.run') def _test_generate_report(self, status, *args): + kwargs = { + 'variable': self.variable, + 'variablefile': self.variablefile, + 'include': self.include + } with mock.patch.object(self.test, 'parse_results') as mock_method: self.assertEqual( - self.test.run( - suites=self.suites, variable=self.variable, - variablefile=self.variablefile, include=self.include), + self.test.run(suites=self.suites, **kwargs), status) args[0].assert_called_once_with( *self.suites, log='NONE', output=self.test.xml_file, |