mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Silence a py.test warning.
This commit is contained in:
parent
2af9468940
commit
a0f05555aa
@ -19,10 +19,10 @@ from gunicorn.instrument.statsd import Statsd
|
|||||||
from support import SimpleNamespace
|
from support import SimpleNamespace
|
||||||
|
|
||||||
|
|
||||||
|
class StatsdTestException(Exception):
|
||||||
class TestException(Exception):
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MockSocket(object):
|
class MockSocket(object):
|
||||||
"Pretend to be a UDP socket"
|
"Pretend to be a UDP socket"
|
||||||
def __init__(self, failp):
|
def __init__(self, failp):
|
||||||
@ -31,7 +31,7 @@ class MockSocket(object):
|
|||||||
|
|
||||||
def send(self, msg):
|
def send(self, msg):
|
||||||
if self.failp:
|
if self.failp:
|
||||||
raise TestException("Should not interrupt the logger")
|
raise StatsdTestException("Should not interrupt the logger")
|
||||||
|
|
||||||
sock_dir = tempfile.mkdtemp()
|
sock_dir = tempfile.mkdtemp()
|
||||||
sock_file = os.path.join(sock_dir, "test.sock")
|
sock_file = os.path.join(sock_dir, "test.sock")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user