|
1 | 1 | *** Settings *** |
2 | 2 | Resource resource.txt |
| 3 | +Variables arguments.py |
| 4 | +Test Template Return Value Should Be |
3 | 5 |
|
4 | 6 | *** Test Cases *** |
5 | 7 | Return String |
6 | | - Return Value Should Be Return String 'Hello, world!' |
| 8 | + Return String Hello, world! |
7 | 9 |
|
8 | 10 | Return Empty String |
9 | | - Return Value Should Be Return Empty String '' |
| 11 | + Return Empty String ${EMPTY} |
10 | 12 |
|
11 | 13 | Return Unicode String |
12 | | - Return Value Should Be Return Unicode String u'Hyv\\u00E4\\u00E4 y\\u00F6t\\u00E4. \\u0421\\u043F\\u0430\\u0441\\u0438\\u0431\\u043E!' |
| 14 | + Return Unicode String ${UNICODE STRING} |
13 | 15 |
|
14 | 16 | Return Integer |
15 | | - Return Value Should Be Return Integer 42 |
16 | | - Return Value Should Be Return Negative Integer -1 |
| 17 | + Return Integer ${42} |
| 18 | + Return Negative Integer ${-1} |
17 | 19 |
|
18 | 20 | Return Float |
19 | | - Return Value Should Be Return Float 3.14 |
20 | | - Return Value Should Be Return Negative Float -0.5 |
| 21 | + Return Float ${3.14} |
| 22 | + Return Negative Float ${-0.5} |
21 | 23 |
|
22 | 24 | Return Zero |
23 | | - Return Value Should Be Return Zero 0 |
| 25 | + Return Zero ${0} |
24 | 26 |
|
25 | 27 | Return Boolean |
26 | | - Return Value Should Be Return Boolean True True |
27 | | - Return Value Should Be Return Boolean False False |
| 28 | + Return Boolean True ${True} |
| 29 | + Return Boolean False ${False} |
28 | 30 |
|
29 | | -Return Nothing |
30 | | - [Documentation] None/nil/null is not supported by all XML-RPC versions and thus it is converted to an empty string |
31 | | - Return Value Should Be Return Nothing '' |
| 31 | +Return None |
| 32 | + [Documentation] None is not supported by all XML-RPC versions and thus it is converted to an empty string |
| 33 | + Return Nothing ${EMPTY} |
32 | 34 |
|
33 | 35 | Return Arbitrary Object |
34 | | - [Documentation] Arbitrary objects cannot be transferred over XML-RPC and thus only their string presentation is returned |
35 | | - Return Value Should Be Return Object '<MyObject>' |
| 36 | + [Documentation] Arbitrary objects cannot be transferred over XML-RPC and thus only their string presentation is returned |
| 37 | + Return Object <MyObject> |
36 | 38 |
|
37 | 39 | Return List |
38 | | - Return Value Should Be Return List ['One', -2, False] |
39 | | - Return Value Should Be Return Empty List [] |
| 40 | + Return List ${LIST} |
| 41 | + Return Empty List ${EMPTY LIST} |
40 | 42 |
|
41 | 43 | Return List Containing None |
42 | | - Return Value Should Be Return List Containing None [''] |
| 44 | + Return List Containing None [''] eval |
43 | 45 |
|
44 | 46 | Return List Containing Arbitrary Objects |
45 | | - Return Value Should Be Return List Containing Objects ['<MyObject1>', '<MyObject2>'] |
| 47 | + Return List Containing Objects ['<MyObject1>', '<MyObject2>'] eval |
46 | 48 |
|
47 | 49 | Return Nested List |
48 | | - Return Value Should Be Return Nested List [ [True, False], [[1, '', '<MyObject>', {}]] ] |
| 50 | + Return Nested List [[True, False], [[1, '', '<MyObject>', {}]]] eval |
49 | 51 |
|
50 | 52 | Return Tuple |
51 | | - [Documentation] Tuples are converted to lists |
52 | | - Return Value Should Be Return Tuple [1, 'two', True] |
53 | | - Return Value Should Be Return Empty Tuple [] |
54 | | - Return Value Should Be Return Nested Tuple [ [True, False], [[1, '', '<MyObject>', {}]] ] |
| 53 | + [Documentation] Tuples are converted to lists |
| 54 | + Return Tuple ${LIST} |
| 55 | + Return Empty Tuple ${EMPTY LIST} |
| 56 | + Return Nested Tuple [[True, False], [[1, '', '<MyObject>', {}]]] eval |
55 | 57 |
|
56 | 58 | Return Dictionary |
57 | | - Return Value Should Be Return Dictionary {'one': 1, 'spam': 'eggs'} |
58 | | - Return Value Should Be Return Empty Dictionary {} |
| 59 | + Return Dictionary ${DICT} |
| 60 | + Return Empty Dictionary ${EMPTY DICT} |
59 | 61 |
|
60 | 62 | Return Dictionary With Non-String Keys |
61 | | - [Documentation] XML-RPC supports only strings as keys so must convert them |
62 | | - Return Value Should Be Return Dictionary With Non String Keys {'1': 2, '': 1} |
| 63 | + [Documentation] XML-RPC supports only strings as keys so must convert them |
| 64 | + Return Dictionary With Non String Keys {'1': 2, '': 1} eval |
63 | 65 |
|
64 | 66 | Return Dictionary Containing None |
65 | | - Return Value Should Be Return Dictionary Containing None {'As value': '', '': 'As key'} |
| 67 | + Return Dictionary Containing None {'As value': '', '': 'As key'} eval |
66 | 68 |
|
67 | 69 | Return Dictionary Containing Objects |
68 | | - Return Value Should Be Return Dictionary Containing Objects {'As value': '<MyObject1>', '<MyObject2>': 'As key'} |
| 70 | + Return Dictionary Containing Objects {'As value': '<MyObject1>', '<MyObject2>': 'As key'} eval |
69 | 71 |
|
70 | 72 | Return Nested Dictionary |
71 | | - Return Value Should Be Return Nested Dictionary {'1': {'': False}, '2': {'A': {'n': ''}, 'B': {'o': '<MyObject>', 'e': {}}} } |
| 73 | + Return Nested Dictionary {'1': {'': False}, '2': {'A': {'n': ''}, 'B': {'o': '<MyObject>', 'e': {}}}} eval |
72 | 74 |
|
73 | 75 | Return Control Char |
74 | | - [Documentation] FAIL REGEXP: Processing XML-RPC return value failed. Most often this happens when the return value contains characters that are not valid in XML. Original error was: ExpatError: .* |
75 | | - Return Control Char |
| 76 | + [Documentation] May also fail with ExpatError. |
| 77 | + Return Control Char ${CONTROL CHAR} |
76 | 78 |
|
77 | 79 | *** Keywords *** |
78 | 80 | Return Value Should Be |
79 | | - [Arguments] ${keyword} ${expected} |
80 | | - ${actual} = Run Keyword ${keyword} |
81 | | - ${expected} = Evaluate ${expected} |
82 | | - Should Be Equal ${actual} ${expected} |
83 | | - |
| 81 | + [Arguments] ${keyword} ${expected} ${evaluate}= |
| 82 | + ${actual} = Run Keyword ${keyword} |
| 83 | + ${tester} = Set Variable If "${evaluate}" |
| 84 | + ... Should Be Equal Evaluated Should Be Equal |
| 85 | + Run Keyword ${tester} ${actual} ${expected} |
| 86 | + |
| 87 | +Should Be Equal Evaluated |
| 88 | + [Arguments] ${actual} ${expected} |
| 89 | + ${expected} = Evaluate ${expected} |
| 90 | + Should Be Equal ${actual} ${expected} |
0 commit comments