Example #1
0
 def test_socket(self):
     if TRAVIS:
         return
     sock = CircusSocket('somename', 'localhost', 0)
     try:
         sock.bind_and_listen()
     finally:
         sock.close()
Example #2
0
 def test_set_inheritable(self):
     sockfile = self._get_tmp_filename()
     sock = CircusSocket('somename', path=sockfile, umask=0)
     try:
         sock.bind_and_listen()
         self.assertTrue(sock.get_inheritable())
     finally:
         sock.close()
Example #3
0
 def test_set_inheritable(self):
     sockfile = self._get_tmp_filename()
     sock = CircusSocket('somename', path=sockfile, umask=0)
     try:
         sock.bind_and_listen()
         self.assertTrue(sock.get_inheritable())
     finally:
         sock.close()
Example #4
0
 def test_socket(self):
     if TRAVIS:
         return
     sock = CircusSocket('somename', 'localhost', 0)
     try:
         sock.bind_and_listen()
     finally:
         sock.close()
 def test_unix_socket(self):
     sockfile = self._get_tmp_filename()
     sock = CircusSocket('somename', path=sockfile, umask=0)
     try:
         sock.bind_and_listen()
         self.assertTrue(os.path.exists(sockfile))
         permissions = oct(os.stat(sockfile).st_mode)[-3:]
         self.assertEqual(permissions, '777')
     finally:
         sock.close()
Example #6
0
 def test_unix_socket(self):
     sockfile = self._get_tmp_filename()
     sock = CircusSocket('somename', path=sockfile, umask=0)
     try:
         sock.bind_and_listen()
         self.assertTrue(os.path.exists(sockfile))
         permissions = oct(os.stat(sockfile).st_mode)[-3:]
         self.assertEqual(permissions, '777')
     finally:
         sock.close()
Example #7
0
    def test_unix_socket(self):
        fd, sockfile = tempfile.mkstemp()
        os.close(fd)
        os.remove(sockfile)

        sock = CircusSocket('somename', path=sockfile)
        try:
            sock.bind_and_listen()
            self.assertTrue(os.path.exists(sockfile))
        finally:
            sock.close()
            os.remove(sockfile)
Example #8
0
    def test_unix_socket(self):
        fd, sockfile = tempfile.mkstemp()
        os.close(fd)
        os.remove(sockfile)

        sock = CircusSocket('somename', path=sockfile, umask=0)
        try:
            sock.bind_and_listen()
            self.assertTrue(os.path.exists(sockfile))
            permissions = oct(os.stat(sockfile).st_mode)[-3:]
            self.assertEqual(permissions, '777')
        finally:
            sock.close()
Example #9
0
    def test_unix_socket(self):
        fd, sockfile = tempfile.mkstemp()
        os.close(fd)
        os.remove(sockfile)

        sock = CircusSocket('somename', path=sockfile, umask=0)
        try:
            sock.bind_and_listen()
            self.assertTrue(os.path.exists(sockfile))
            permissions = oct(os.stat(sockfile).st_mode)[-3:]
            self.assertEqual(permissions, '777')
        finally:
            sock.close()
Example #10
0
 def test_socket(self):
     sock = CircusSocket("somename", "localhost", 0)
     try:
         sock.bind_and_listen()
     finally:
         sock.close()