Commit Graph

60 Commits

Author SHA1 Message Date
Erik Johnson
59e7481e2b Fix TestSaltCacheLoader tests
Similar fixes as made for TestGetTemplate
2015-01-26 16:04:21 -06:00
Erik Johnson
d34c0c7787 Fix jinja tests
With recent edits to the jinja templating system, file_roots and
pillar_roots are referenced, so they need to be in the mocked opts dict.
2015-01-26 13:10:05 -06:00
Erik Johnson
c1fd180c45 Fix jinja tests
These tests were using the now-outdated method of looking in the
file_roots for cached templates in masterless mode.
2014-12-10 18:41:32 -06:00
Pedro Algarvio
aaf0f4aba0 Fix imports 2014-11-26 21:08:13 +00:00
Thomas S Hatch
e2d640962a Fix Jinja test 2014-09-23 14:02:34 -06:00
Thomas S Hatch
7355f53057 Add fileserver_backend to jinja tests local opts 2014-09-22 10:29:25 -06:00
Seth House
0d8cc41c61 Added tests for calling functions via Jinja with dot-lookup syntax
Yay!
2014-07-25 12:27:45 -06:00
Khris Richardson
1acd82f3f1 add sphinx spelling extension. enforce en_us 2014-07-13 13:43:33 -05:00
Erik Johnson
0104ccc400 Fix failing jinja unit tests
These began failing due to a recent change in the error reporting for
undefined jinja variables.
2014-06-12 14:33:53 -05:00
Seth House
c94cd38c65 Added unit test for the import_text tag 2014-03-06 17:30:47 -08:00
Pedro Algarvio
7a42bf24fc Jinja's sequence filter does not need to be an extension. 2014-02-15 17:26:35 +00:00
Xavier Barbosa
d7eb1d2f9d fix jinja SequenceExtension 2014-02-13 08:59:29 +01:00
Thomas S Hatch
a7baf5936c Revert "add sequence filter for jinja"
This reverts commit cbe04b8231.
2014-02-11 15:59:22 -07:00
Xavier Barbosa
cbe04b8231 add sequence filter for jinja 2014-02-11 20:42:40 +01:00
Pedro Algarvio
ec75329a88 Ignore and remove unused imports 2014-02-08 08:01:12 +00:00
Mathieu Le Marec - Pasquet
9a9eada12f Better trace for nested jinja errors 2014-01-03 18:16:11 +01:00
Thomas S Hatch
30c49e32c7 Revert "Better trace for nested jinja errors"
This reverts commit 78899493bb.
2013-12-31 12:22:24 -07:00
Thomas S Hatch
697bffcf1d Revert "division test fix"
This reverts commit 56bcfbb03c.
2013-12-31 12:22:13 -07:00
Mathieu Le Marec - Pasquet
56bcfbb03c division test fix 2013-12-31 14:34:29 +00:00
Mathieu Le Marec - Pasquet
78899493bb Better trace for nested jinja errors 2013-12-31 13:25:57 +00:00
Thomas S Hatch
5eaca79810 Revert "Better trace for nested jinja errors"
This reverts commit 99a2791917.
2013-12-30 11:32:53 -07:00
Mathieu Le Marec - Pasquet
99a2791917 Better trace for nested jinja errors 2013-12-25 18:00:15 +00:00
Pedro Algarvio
2648ed90ba Fix lint issues. 2013-12-09 20:02:25 +00:00
regilero
7d05551062 Manage errors containing utf-8 or unicode charcters at the jinja level 2013-12-05 18:46:43 +01:00
Pedro Algarvio
aa8ead9897 Remove duplicate method 2013-11-27 13:06:59 +00:00
Pedro Algarvio
0ae1a15c61 PEP8 E302 and E303 blank lines fixes. 2013-11-27 12:11:45 +00:00
Pedro Algarvio
8ba59ea6c6 Adapt the tests to the latest Jinja2 template changes. 2013-11-14 01:21:57 +00:00
Pedro Algarvio
f4cba0d293 Deprecate env usage in favor of saltenv. 2013-11-12 01:01:50 +00:00
Xavier Barbosa
a5575aca13 deprecated assertEquals 2013-10-25 02:33:17 +02:00
Xavier Barbosa
a218aea003 fix jinja unittest 2013-10-25 02:33:16 +02:00
Xavier Barbosa
1309ef9887 fix jinja rendering of nested structures 2013-10-25 02:33:16 +02:00
Henrik Holmboe
77fd1acb7f Change assertEquals to assertEqual
According to
http://docs.python.org/2/library/unittest.html#deprecated-aliases
assertEquals is a deprecated alias of assertEqual.
2013-10-24 11:39:04 +02:00
Seth House
54cc36566e Added a pprint.pformat Jinja filter to match the file.serialize state 2013-10-16 09:23:14 -06:00
Pedro Algarvio
30e747060d Jinja needs to be "fed" Unicode data. Fixes #7576.
Additionally, what's returned from `render_jinja_tmpl` is also a Unicode string to that the `SLS_ENCODER` can properly encode them. Encoding UTF-8 data as UTF-8 data using the `SLS_ENCODER` does not, of course, work.
2013-10-08 00:11:44 +01:00
Pedro Algarvio
a5a87ca1fc Mimic the test case shown @ http://goo.gl/UI7uS8 2013-10-08 00:11:19 +01:00
Roberto Aguilar
ef968e7c64 Added tests for error template context. 2013-09-19 01:02:05 -07:00
Xavier Barbosa
c1b6e06a0f added load tag, and revamped parsing 2013-07-26 09:30:41 +02:00
Xavier Barbosa
11ef87bd5d finished cleanup 2013-07-19 16:53:51 +02:00
Xavier Barbosa
abd031963f removed anchored yaml, does not work with CDumper... 2013-07-19 16:50:59 +02:00
Xavier Barbosa
f8bf53b682 added doc for yaml / json tags 2013-07-19 16:02:29 +02:00
Xavier Barbosa
9288281c63 added to jinja load* filters and tags 2013-07-19 16:02:28 +02:00
Xavier Barbosa
117f76def4 added AnchoredDumper 2013-07-19 16:02:28 +02:00
Pedro Algarvio
db6553a019 Skip unit.templates.jinja_test.TestGetTemplate.test_strftime test if timelib is not installed. 2013-07-17 11:23:42 +01:00
Xavier Barbosa
22e1da9148 changed dateutil by timelib saltstack/salt#6088 2013-07-15 11:12:23 +02:00
Xavier Barbosa
00e373b63b added unittests for strftime filter saltstack/salt#6088 2013-07-15 11:12:21 +02:00
Xavier Barbosa
3f49000ba2 unittesting for file.serialize and yaml & json filters 2013-07-08 16:19:19 +02:00
Pedro Algarvio
d6049a92b5 Use an unicode aware context in the jinja render call. Refs #3436 2013-07-02 14:28:20 +01:00
Pedro Algarvio
4a875f5b35 Updated unit.templates.jinja_test test suite to use salttesting.helpers.ensure_in_syspath() 2013-06-28 00:13:04 +01:00
Pedro Algarvio
222be7b446 Make sure every test module is runnable by __main__.
* Double to single quotes
2013-06-28 00:12:56 +01:00
Michał Jarco
7f782afb14 Fixed jinja_tests.
File roots contains lists of paths for each env.
2013-01-14 08:58:27 +01:00