|
1 | 1 | #
|
2 |
| -# Copyright © 2021 Ingram Micro Inc. All rights reserved. |
| 2 | +# Copyright © 2022 Ingram Micro Inc. All rights reserved. |
3 | 3 | #
|
4 | 4 |
|
5 | 5 | from copy import copy
|
@@ -35,39 +35,39 @@ def filter_data(f_name):
|
35 | 35 |
|
36 | 36 | def test_description_common_render():
|
37 | 37 | result = RQLFilterDescriptionTemplate.render(*filter_data('id'))
|
38 |
| - assert result == '**Filter for: id**\n\nlookups: eq, ne, ge, gt, le, lt, null, in, out' |
| 38 | + assert result == 'Filter for: id\n\n**lookups:** eq, ne, ge, gt, le, lt, null, in, out' |
39 | 39 |
|
40 | 40 |
|
41 | 41 | def test_description_search_render():
|
42 | 42 | result = RQLFilterDescriptionTemplate.render(*filter_data('str_choice_field'))
|
43 | 43 | assert result == (
|
44 |
| - '**Filter for: str_choice_field**\n\nlookups: ' |
45 |
| - 'eq, ne, like, ilike, in, out\nsearch: true' |
| 44 | + 'Filter for: str_choice_field\n\n**lookups:** ' |
| 45 | + 'eq, ne, like, ilike, in, out\n\n**search:** true' |
46 | 46 | )
|
47 | 47 |
|
48 | 48 |
|
49 | 49 | def test_description_ordering_render():
|
50 | 50 | result = RQLFilterDescriptionTemplate.render(*filter_data('int_choice_field'))
|
51 | 51 | assert result == (
|
52 |
| - '**Filter for: int_choice_field**\n\nlookups: ' |
53 |
| - 'eq, ne, ge, gt, le, lt, in, out\nordering: true' |
| 52 | + 'Filter for: int_choice_field\n\n**lookups:** ' |
| 53 | + 'eq, ne, ge, gt, le, lt, in, out\n\n**ordering:** true' |
54 | 54 | )
|
55 | 55 |
|
56 | 56 |
|
57 | 57 | def test_description_null_overridden_render():
|
58 | 58 | result = RQLFilterDescriptionTemplate.render(*filter_data('title'))
|
59 | 59 | assert result == (
|
60 |
| - '**Filter for: title**\n\n' |
61 |
| - 'lookups: eq, ne, like, ilike, null, in, out\nsearch: true\n' |
62 |
| - 'null: NULL_ID, null()' |
| 60 | + 'Filter for: title\n\n' |
| 61 | + '**lookups:** eq, ne, like, ilike, null, in, out\n\n**search:** true\n\n' |
| 62 | + '**null:** NULL_ID, null()' |
63 | 63 | )
|
64 | 64 |
|
65 | 65 |
|
66 | 66 | def test_description_hidden_render():
|
67 | 67 | result = RQLFilterDescriptionTemplate.render(*filter_data('select_author'))
|
68 | 68 | assert result == (
|
69 |
| - '**Filter for: select_author**\n\n' |
70 |
| - 'lookups: eq, ne, like, ilike, in, out\ndefault: **hidden**' |
| 69 | + 'Filter for: select_author\n\n' |
| 70 | + '**lookups:** eq, ne, like, ilike, in, out\n\n**default:** *hidden*' |
71 | 71 | )
|
72 | 72 |
|
73 | 73 |
|
|
0 commit comments