예제 #1
0
 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'))
예제 #2
0
파일: test_utils.py 프로젝트: akissa/spamc
 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'))
예제 #3
0
 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')
예제 #4
0
 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')