def _verify_run(self, args): kw = Keyword('handler_name', args) assert_equals(kw.name, 'handler_name') assert_equals(kw.args, args) kw.run(_FakeContext()) assert_equals(kw.name, 'Mocked.handler_name') assert_equals(kw.doc, 'Mock Doc') assert_equals(kw.handler_name, 'handler_name')
def _verify_run(self, args): kw = Keyword("handler_name", args) assert_equals(kw.name, "handler_name") assert_equals(kw.args, args) kw.run(_FakeContext()) assert_equals(kw.name, "Mocked.handler_name") assert_equals(kw.doc, "Mock Doc") assert_equals(kw.handler_name, "handler_name")
def _run_kw(self, assign, return_value): kw = Keyword('Name', ['Return', return_value], assign) context = _FakeContext() kw.run(context) return context.variables
def test_run_error(self): kw = Keyword('handler_name', ()) assert_raises(ExecutionFailed, kw.run, _FakeContext(error=True))
def _run_kw(self, assign, return_value): kw = Keyword("Name", ["Return", return_value], assign) context = _FakeContext() kw.run(context) return context.variables