aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/tests/unit/core/test_robotframework.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-09-23 10:48:26 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2022-09-23 12:21:59 +0200
commit25c7404b8d2a8f36170f6067c97915ddb6128bfd (patch)
tree8fd35da3498ad18f0563915a7afe6cb3a31ac090 /xtesting/tests/unit/core/test_robotframework.py
parent4970d3bfe0e8e580beaa86ae7c41977e2e93ab3f (diff)
Make robot driver even more generic
It allows setting any option via testcases.yaml Change-Id: I8cb5ead037a65f962c3ba1a14729b52195e95483 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/tests/unit/core/test_robotframework.py')
-rw-r--r--xtesting/tests/unit/core/test_robotframework.py25
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,