mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-16 01:45:25 -07:00
test/: PEP8 compliancy (#24803)
* test/: PEP8 compliancy - Make PEP8 compliant * Python3 chokes on casting int to bytes (#24952) But if we tell the formatter that the var is a number, it works
This commit is contained in:
parent
31c59ad5f9
commit
4efec414e7
110 changed files with 1702 additions and 1547 deletions
|
@ -36,11 +36,8 @@ class KnownHostsDiffTestCase(unittest.TestCase):
|
|||
self.assertEqual(diff, {
|
||||
'before_header': path,
|
||||
'after_header': path,
|
||||
'before':
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'after':
|
||||
'two.example.com ssh-rsa BBBBetc\n'
|
||||
'one.example.com ssh-rsa AAAAetc\n',
|
||||
'before': 'two.example.com ssh-rsa BBBBetc\n',
|
||||
'after': 'two.example.com ssh-rsa BBBBetc\none.example.com ssh-rsa AAAAetc\n',
|
||||
})
|
||||
|
||||
def test_no_change(self):
|
||||
|
@ -53,12 +50,8 @@ class KnownHostsDiffTestCase(unittest.TestCase):
|
|||
self.assertEqual(diff, {
|
||||
'before_header': path,
|
||||
'after_header': path,
|
||||
'before':
|
||||
'one.example.com ssh-rsa AAAAetc\n'
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'after':
|
||||
'one.example.com ssh-rsa AAAAetc\n'
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'before': 'one.example.com ssh-rsa AAAAetc\ntwo.example.com ssh-rsa BBBBetc\n',
|
||||
'after': 'one.example.com ssh-rsa AAAAetc\ntwo.example.com ssh-rsa BBBBetc\n',
|
||||
})
|
||||
|
||||
def test_key_change(self):
|
||||
|
@ -71,12 +64,8 @@ class KnownHostsDiffTestCase(unittest.TestCase):
|
|||
self.assertEqual(diff, {
|
||||
'before_header': path,
|
||||
'after_header': path,
|
||||
'before':
|
||||
'one.example.com ssh-rsa AAAaetc\n'
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'after':
|
||||
'two.example.com ssh-rsa BBBBetc\n'
|
||||
'one.example.com ssh-rsa AAAAetc\n',
|
||||
'before': 'one.example.com ssh-rsa AAAaetc\ntwo.example.com ssh-rsa BBBBetc\n',
|
||||
'after': 'two.example.com ssh-rsa BBBBetc\none.example.com ssh-rsa AAAAetc\n',
|
||||
})
|
||||
|
||||
def test_key_removal(self):
|
||||
|
@ -89,11 +78,8 @@ class KnownHostsDiffTestCase(unittest.TestCase):
|
|||
self.assertEqual(diff, {
|
||||
'before_header': path,
|
||||
'after_header': path,
|
||||
'before':
|
||||
'one.example.com ssh-rsa AAAAetc\n'
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'after':
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'before': 'one.example.com ssh-rsa AAAAetc\ntwo.example.com ssh-rsa BBBBetc\n',
|
||||
'after': 'two.example.com ssh-rsa BBBBetc\n',
|
||||
})
|
||||
|
||||
def test_key_removal_no_change(self):
|
||||
|
@ -105,8 +91,6 @@ class KnownHostsDiffTestCase(unittest.TestCase):
|
|||
self.assertEqual(diff, {
|
||||
'before_header': path,
|
||||
'after_header': path,
|
||||
'before':
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'after':
|
||||
'two.example.com ssh-rsa BBBBetc\n',
|
||||
'before': 'two.example.com ssh-rsa BBBBetc\n',
|
||||
'after': 'two.example.com ssh-rsa BBBBetc\n',
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue