summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/jinja2_native_types/test_dunder.yml
blob: df5ea9276b7779b31210c9f207c6e1a5280f5937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- name: test variable dunder
  set_fact:
      var_dunder: "{{ b_true.__class__ }}"

- assert:
    that:
        - 'var_dunder|type_debug == "type"'

- name: test constant dunder
  set_fact:
      const_dunder: "{{ true.__class__ }}"

- assert:
    that:
        - 'const_dunder|type_debug == "type"'

- name: test constant dunder to string
  set_fact:
      const_dunder: "{{ true.__class__|string }}"

- assert:
    that:
        - 'const_dunder|type_debug in ["str", "unicode", "NativeJinjaText"]'