Debian Codegraph @

test/units/utils/display/test_display.py

raw
1 # -*- coding: utf-8 -*-
2 # Copyright (c) 2020 Ansible Project
3 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4
5 from __future__ import annotations
6
7
8 from ansible.utils.display import Display
9
10
11 def test_display_basic_message(capsys, mocker, display_resource):
12 # Disable logging
13 mocker.patch('ansible.utils.display.logger', return_value=None)
14
15 d = Display()
16 d.display(u'Some displayed message')
17 out, err = capsys.readouterr()
18 assert out == 'Some displayed message\n'
19 assert err == ''