def setUpClass(cls): cls.using_sa = True if os.environ.get('SPAMD_SOCK', None) is None: cls.unix_server = return_unix() t1 = threading.Thread(target=cls.unix_server.serve_forever) t1.setDaemon(True) t1.start() cls.using_sa = False cls.spamc_unix = SpamC( socket_file=os.environ.get('SPAMD_SOCK', 'spamd.sock'))
def setUpClass(cls): gzip = False cls.using_sa = True if os.environ.get('SPAMD_SOCK', None) is None: cls.unix_server = return_unix() t1 = threading.Thread(target=cls.unix_server.serve_forever) t1.setDaemon(True) t1.start() cls.using_sa = False if os.environ.get('SPAMD_COMPRESS', None) and \ os.environ.get('CI', False): gzip = True cls.spamc_unix = SpamC(socket_file=os.environ.get( 'SPAMD_SOCK', 'spamd.sock'), gzip=gzip) path = os.path.dirname(os.path.dirname(__file__)) cls.filename = os.path.join(path, 'examples', 'sample-spam.txt')
def setUpClass(cls): gzip = False cls.using_sa = True if os.environ.get('SPAMD_SOCK', None) is None: cls.unix_server = return_unix() t1 = threading.Thread(target=cls.unix_server.serve_forever) t1.setDaemon(True) t1.start() cls.using_sa = False if os.environ.get('SPAMD_COMPRESS', None) and \ os.environ.get('CI', False): gzip = True cls.spamc_unix = SpamC( socket_file=os.environ.get('SPAMD_SOCK', 'spamd.sock'), gzip=gzip) path = os.path.dirname(os.path.dirname(__file__)) cls.filename = os.path.join(path, 'examples', 'sample-spam.txt')