Debian Codegraph @

test/units/module_utils/test_text.py

raw
1 from __future__ import annotations
2
3 import codecs
4
5 from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
6
7
8 def test_exports():
9 """Ensure legacy attributes are exported."""
10
11 from ansible.module_utils import _text
12
13 assert _text.codecs == codecs
14 assert _text.PY3 is True
15 assert _text.text_type is str
16 assert _text.binary_type is bytes
17 assert _text.to_bytes == to_bytes
18 assert _text.to_native == to_native
19 assert _text.to_text == to_text