Debian Codegraph @

ansible_collections/community/general/tests/unit/plugins/modules/test_django_command.yaml

raw
1 # Copyright (c) Alexei Znamensky ([email protected])
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 ---
6 anchors:
7 environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
8 test_cases:
9 - id: command_success
10 input:
11 command: check
12 extra_args:
13 - babaloo
14 - yaba
15 - daba
16 - doo
17 settings: whatever.settings
18 mocks:
19 run_command:
20 - command: [/testbin/python, -m, django, --version]
21 environ: *env-def
22 rc: 0
23 out: "5.1.2\n"
24 err: ''
25 - command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings, babaloo, yaba, daba, doo]
26 environ: *env-def
27 rc: 0
28 out: "whatever\n"
29 err: ''
30 - id: command_fail
31 input:
32 command: check
33 extra_args:
34 - babaloo
35 - yaba
36 - daba
37 - doo
38 settings: whatever.settings
39 output:
40 failed: true
41 mocks:
42 run_command:
43 - command: [/testbin/python, -m, django, --version]
44 environ: *env-def
45 rc: 0
46 out: "5.1.2\n"
47 err: ''
48 - command: [/testbin/python, -m, django, check, --no-color, --settings=whatever.settings, babaloo, yaba, daba, doo]
49 environ: *env-def
50 rc: 1
51 out: "whatever\n"
52 err: ''