Skip to content

Commit e50440c

Browse files
committed
test with timeout option
1 parent c4a27a3 commit e50440c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/test_api.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ def mkdtemp(*args, **kwargs):
2424
shutil.rmtree(temp_dir)
2525

2626

27-
class TestUnixSocket():
27+
class TestUnixSocket(object):
28+
def __init__(self):
29+
self.kwargs = {}
30+
2831
def setup(self):
29-
self.cd = clamd.ClamdUnixSocket()
32+
self.cd = clamd.ClamdUnixSocket(**self.kwargs)
3033

3134
def test_ping(self):
3235
assert_true(self.cd.ping())
@@ -72,3 +75,8 @@ def test_instream(self):
7275
self.cd.instream(BytesIO(clamd.EICAR)),
7376
{'stream': ('FOUND', 'Eicar-Test-Signature')}
7477
)
78+
79+
80+
class TestUnixSocketTimeout(TestUnixSocket):
81+
def __init__(self):
82+
self.kwargs = {"timeout": 10}

0 commit comments

Comments
 (0)