Browse Source

[1086] Fix wrong addressformatter call

and add test for it
Jelte Jansen 12 years ago
parent
commit
37e3ef0278
2 changed files with 11 additions and 1 deletions
  1. 1 1
      src/bin/bind10/init.py.in
  2. 10 0
      src/bin/bind10/tests/init_test.py.in

+ 1 - 1
src/bin/bind10/init.py.in

@@ -429,7 +429,7 @@ class Init:
                         port)
         else:
             logger.info(BIND10_STARTING_PROCESS_PORT_ADDRESS,
-                        self.curproc, AddressFormatter(address, port))
+                        self.curproc, AddressFormatter((address, port)))
 
     def log_started(self, pid = None):
         """

+ 10 - 0
src/bin/bind10/tests/init_test.py.in

@@ -2339,6 +2339,16 @@ class SocketSrvTest(unittest.TestCase):
         self.assertEqual({}, self.__b10_init._unix_sockets)
         self.assertTrue(sock.closed)
 
+    def test_log_starting(self):
+        """
+        Checks the log_starting call doesn't raise any errors
+        (does not check actual log output)
+        """
+        self.__b10_init.log_starting("foo")
+        self.__b10_init.log_starting("foo", 1)
+        self.__b10_init.log_starting("foo", 1, "192.0.2.1")
+
+
 class TestFunctions(unittest.TestCase):
     def setUp(self):
         self.lockfile_testpath = \