fix: format all code with black

and from now on should not deviate from that...
This commit is contained in:
Lance Edgar 2025-08-31 12:52:36 -05:00
parent 2bd094b10b
commit 147d2fd871
17 changed files with 298 additions and 216 deletions

View file

@ -10,7 +10,7 @@ class TestSetConfig(TestCase):
def test_basic(self):
c = MagicMock()
mod.set_config(c, 'foo', 'bar')
mod.set_config(c, "foo", "bar")
c.run.assert_called_once_with("postconf -e 'foo=bar'")
@ -18,7 +18,7 @@ class TestSetMyhostname(TestCase):
def test_basic(self):
c = MagicMock()
mod.set_myhostname(c, 'test.example.com')
mod.set_myhostname(c, "test.example.com")
c.run.assert_called_once_with("postconf -e 'myhostname=test.example.com'")
@ -26,7 +26,7 @@ class TestSetMyorigin(TestCase):
def test_basic(self):
c = MagicMock()
mod.set_myorigin(c, 'example.com')
mod.set_myorigin(c, "example.com")
c.run.assert_called_once_with("postconf -e 'myorigin=example.com'")
@ -34,15 +34,17 @@ class TestSetMydestination(TestCase):
def test_basic(self):
c = MagicMock()
mod.set_mydestination(c, 'example.com', 'test.example.com', 'localhost')
c.run.assert_called_once_with("postconf -e 'mydestination=example.com, test.example.com, localhost'")
mod.set_mydestination(c, "example.com", "test.example.com", "localhost")
c.run.assert_called_once_with(
"postconf -e 'mydestination=example.com, test.example.com, localhost'"
)
class TestSetMynetworks(TestCase):
def test_basic(self):
c = MagicMock()
mod.set_mynetworks(c, '127.0.0.0/8', '[::1]/128')
mod.set_mynetworks(c, "127.0.0.0/8", "[::1]/128")
c.run.assert_called_once_with("postconf -e 'mynetworks=127.0.0.0/8 [::1]/128'")
@ -50,5 +52,5 @@ class TestSetRelayhost(TestCase):
def test_basic(self):
c = MagicMock()
mod.set_relayhost(c, 'mail.example.com')
mod.set_relayhost(c, "mail.example.com")
c.run.assert_called_once_with("postconf -e 'relayhost=mail.example.com'")