mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-14 01:59:26 +03:00
Improve code spacing
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -103,6 +103,7 @@ class SingTUNLinuxHostTest(unittest.TestCase):
|
||||
Path(arguments[2]).parent.joinpath('ready').write_text(
|
||||
'77', encoding='utf-8'
|
||||
)
|
||||
|
||||
return process
|
||||
|
||||
link = {'ifname': 'utun101', 'ifindex': 77}
|
||||
@@ -117,8 +118,10 @@ class SingTUNLinuxHostTest(unittest.TestCase):
|
||||
self.module, '_command', return_value=json.dumps([link])
|
||||
):
|
||||
self.host.prepare()
|
||||
|
||||
with self.assertRaisesRegex(RuntimeError, 'already active'):
|
||||
self.host.execute([])
|
||||
|
||||
self.host.applyDNS('1.1.1.1')
|
||||
|
||||
self.assertEqual(self.host.index, 77)
|
||||
@@ -135,6 +138,7 @@ class SingTUNLinuxHostTest(unittest.TestCase):
|
||||
self.assertIn('/sys/class/net/utun101/ifindex', scripts[0])
|
||||
self.assertIn('resolvectl dns utun101 1.1.1.1', scripts[0])
|
||||
self.assertNotIn('socks5', ''.join(scripts))
|
||||
|
||||
self.assertIs(self.host._process, process)
|
||||
self.assertIsNotNone(self.host._directory)
|
||||
|
||||
@@ -157,6 +161,7 @@ class SingTUNLinuxHostTest(unittest.TestCase):
|
||||
checked = subprocess.run(
|
||||
[bash, '-n', '-c', script], capture_output=True, timeout=5
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
checked.returncode, 0, checked.stderr.decode(errors='replace')
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user