Debian Codegraph @

test/units/galaxy/test_user_agent.py

raw
1 # -*- coding: utf-8 -*-
2 # Copyright: (c) 2019, 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 import platform
8
9 from ansible.galaxy import user_agent
10 from ansible.module_utils.ansible_release import __version__ as ansible_version
11
12
13 def test_user_agent():
14 res = user_agent.user_agent()
15 assert res.startswith('ansible-galaxy/%s' % ansible_version)
16 assert platform.system() in res
17 assert 'python:' in res