Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 1, 2024
1 parent 0ea1c61 commit b6b12dd
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions tests/unit/modules/network/ios/test_ios_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,28 @@ def test_ios_user_set_sshkey_multiple(self):

def test_add_hashed_password(self):
hashed_password_val = "$9$.h8H2hF/PKwM2E$Sqx1m7o.sEEZbOPelcBFU2tCxc00j3Ukl3Yz9FMK7SE"
set_module_args(dict(name="ansible", hashed_password={
"type": 9,
"value": hashed_password_val,
}))
set_module_args(
dict(
name="ansible",
hashed_password={
"type": 9,
"value": hashed_password_val,
},
),
)
result = self.execute_module(changed=True)
self.assertEqual(result["commands"], [f"username ansible secret 9 {hashed_password_val}"])

def test_add_hpassword_with_type(self):
set_module_args(dict(name="ansible", hashed_password={
"type": 0,
"value": "test",
}, password_type="password"))
set_module_args(
dict(
name="ansible",
hashed_password={
"type": 0,
"value": "test",
},
password_type="password",
),
)
result = self.execute_module(changed=True)
self.assertEqual(result["commands"], [f"username ansible password 0 test"])
self.assertEqual(result["commands"], [f"username ansible password 0 test"])

0 comments on commit b6b12dd

Please sign in to comment.