mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-16 09:55:26 -07:00
PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup. * PEP 8 E126 cleanup. * PEP 8 E122 cleanup.
This commit is contained in:
parent
1c6bb4add9
commit
10d9318de7
244 changed files with 2873 additions and 2973 deletions
|
@ -28,26 +28,26 @@ class TestINILookup(unittest.TestCase):
|
|||
|
||||
# Currently there isn't a new-style
|
||||
old_style_params_data = (
|
||||
# Simple case
|
||||
dict(term=u'keyA section=sectionA file=/path/to/file',
|
||||
# Simple case
|
||||
dict(term=u'keyA section=sectionA file=/path/to/file',
|
||||
expected=[u'keyA', u'section=sectionA', u'file=/path/to/file'],
|
||||
),
|
||||
dict(term=u'keyB section=sectionB with space file=/path/with/embedded spaces and/file',
|
||||
dict(term=u'keyB section=sectionB with space file=/path/with/embedded spaces and/file',
|
||||
expected=[u'keyB', u'section=sectionB with space', u'file=/path/with/embedded spaces and/file'],
|
||||
),
|
||||
dict(term=u'keyC section=sectionC file=/path/with/equals/cn=com.ansible',
|
||||
dict(term=u'keyC section=sectionC file=/path/with/equals/cn=com.ansible',
|
||||
expected=[u'keyC', u'section=sectionC', u'file=/path/with/equals/cn=com.ansible'],
|
||||
),
|
||||
dict(term=u'keyD section=sectionD file=/path/with space and/equals/cn=com.ansible',
|
||||
dict(term=u'keyD section=sectionD file=/path/with space and/equals/cn=com.ansible',
|
||||
expected=[u'keyD', u'section=sectionD', u'file=/path/with space and/equals/cn=com.ansible'],
|
||||
),
|
||||
dict(term=u'keyE section=sectionE file=/path/with/unicode/くらとみ/file',
|
||||
dict(term=u'keyE section=sectionE file=/path/with/unicode/くらとみ/file',
|
||||
expected=[u'keyE', u'section=sectionE', u'file=/path/with/unicode/くらとみ/file'],
|
||||
),
|
||||
dict(term=u'keyF section=sectionF file=/path/with/utf 8 and spaces/くらとみ/file',
|
||||
dict(term=u'keyF section=sectionF file=/path/with/utf 8 and spaces/くらとみ/file',
|
||||
expected=[u'keyF', u'section=sectionF', u'file=/path/with/utf 8 and spaces/くらとみ/file'],
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
@ -305,24 +305,24 @@ class TestParseContent(unittest.TestCase):
|
|||
class TestFormatContent(unittest.TestCase):
|
||||
def test_no_encrypt(self):
|
||||
self.assertEqual(
|
||||
password._format_content(password=u'hunter42',
|
||||
password._format_content(password=u'hunter42',
|
||||
salt=u'87654321',
|
||||
encrypt=False),
|
||||
u'hunter42 salt=87654321')
|
||||
u'hunter42 salt=87654321')
|
||||
|
||||
def test_no_encrypt_no_salt(self):
|
||||
self.assertEqual(
|
||||
password._format_content(password=u'hunter42',
|
||||
password._format_content(password=u'hunter42',
|
||||
salt=None,
|
||||
encrypt=False),
|
||||
u'hunter42')
|
||||
u'hunter42')
|
||||
|
||||
def test_encrypt(self):
|
||||
self.assertEqual(
|
||||
password._format_content(password=u'hunter42',
|
||||
password._format_content(password=u'hunter42',
|
||||
salt=u'87654321',
|
||||
encrypt='pbkdf2_sha256'),
|
||||
u'hunter42 salt=87654321')
|
||||
u'hunter42 salt=87654321')
|
||||
|
||||
def test_encrypt_no_salt(self):
|
||||
self.assertRaises(AssertionError, password._format_content,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue