You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/jinja2_native_types/test_dunder.yml

24 lines
501 B
YAML

- 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"]'