def test_socket(self): if TRAVIS: return sock = CircusSocket('somename', 'localhost', 0) try: sock.bind_and_listen() finally: sock.close()
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()
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()
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)
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()
def test_socket(self): sock = CircusSocket("somename", "localhost", 0) try: sock.bind_and_listen() finally: sock.close()