mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 19:26:58 +00:00
Reformat everything.
This commit is contained in:
parent
3f2213791a
commit
340ff8586d
1008 changed files with 61301 additions and 58309 deletions
|
|
@ -22,8 +22,15 @@ class FakeModule:
|
|||
def test_combine_headers_returns_only_default():
|
||||
expected = {"Accept": "application/json", "Content-type": "application/json"}
|
||||
module = FakeModule(
|
||||
params={'utm_protocol': 'utm_protocol', 'utm_host': 'utm_host', 'utm_port': 1234, 'utm_token': 'utm_token',
|
||||
'name': 'FakeName', 'headers': {}})
|
||||
params={
|
||||
"utm_protocol": "utm_protocol",
|
||||
"utm_host": "utm_host",
|
||||
"utm_port": 1234,
|
||||
"utm_token": "utm_token",
|
||||
"name": "FakeName",
|
||||
"headers": {},
|
||||
}
|
||||
)
|
||||
result = UTM(module, "endpoint", [])._combine_headers()
|
||||
assert result == expected
|
||||
|
||||
|
|
@ -31,17 +38,29 @@ def test_combine_headers_returns_only_default():
|
|||
def test_combine_headers_returns_only_default2():
|
||||
expected = {"Accept": "application/json", "Content-type": "application/json"}
|
||||
module = FakeModule(
|
||||
params={'utm_protocol': 'utm_protocol', 'utm_host': 'utm_host', 'utm_port': 1234, 'utm_token': 'utm_token',
|
||||
'name': 'FakeName'})
|
||||
params={
|
||||
"utm_protocol": "utm_protocol",
|
||||
"utm_host": "utm_host",
|
||||
"utm_port": 1234,
|
||||
"utm_token": "utm_token",
|
||||
"name": "FakeName",
|
||||
}
|
||||
)
|
||||
result = UTM(module, "endpoint", [])._combine_headers()
|
||||
assert result == expected
|
||||
|
||||
|
||||
def test_combine_headers_returns_combined():
|
||||
expected = {"Accept": "application/json", "Content-type": "application/json",
|
||||
"extraHeader": "extraHeaderValue"}
|
||||
module = FakeModule(params={'utm_protocol': 'utm_protocol', 'utm_host': 'utm_host', 'utm_port': 1234,
|
||||
'utm_token': 'utm_token', 'name': 'FakeName',
|
||||
"headers": {"extraHeader": "extraHeaderValue"}})
|
||||
expected = {"Accept": "application/json", "Content-type": "application/json", "extraHeader": "extraHeaderValue"}
|
||||
module = FakeModule(
|
||||
params={
|
||||
"utm_protocol": "utm_protocol",
|
||||
"utm_host": "utm_host",
|
||||
"utm_port": 1234,
|
||||
"utm_token": "utm_token",
|
||||
"name": "FakeName",
|
||||
"headers": {"extraHeader": "extraHeaderValue"},
|
||||
}
|
||||
)
|
||||
result = UTM(module, "endpoint", [])._combine_headers()
|
||||
assert result == expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue