Silence a py.test warning.

This commit is contained in:
Berker Peksag 2015-07-03 07:41:53 +03:00
parent 2af9468940
commit a0f05555aa

View File

@ -19,10 +19,10 @@ from gunicorn.instrument.statsd import Statsd
from support import SimpleNamespace
class TestException(Exception):
class StatsdTestException(Exception):
pass
class MockSocket(object):
"Pretend to be a UDP socket"
def __init__(self, failp):
@ -31,7 +31,7 @@ class MockSocket(object):
def send(self, msg):
if self.failp:
raise TestException("Should not interrupt the logger")
raise StatsdTestException("Should not interrupt the logger")
sock_dir = tempfile.mkdtemp()
sock_file = os.path.join(sock_dir, "test.sock")