We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9352782 commit d115e02Copy full SHA for d115e02
src/tests/test_api.py
@@ -77,6 +77,19 @@ def test_instream(self):
77
def test_insteam_success(self):
78
assert self.cd.instream(BytesIO(b"foo")) == {'stream': ('OK', None)}
79
80
+ def test_fdscan(self):
81
+ with tempfile.NamedTemporaryFile('wb', prefix="python-clamd") as f:
82
+ f.write(clamd.EICAR)
83
+ f.flush()
84
+ expected = {f.name: ('FOUND', 'Eicar-Test-Signature')}
85
+ assert self.cd.fdscan(f.name, f.fileno()) == expected
86
+
87
+ def test_fdscan_success(self):
88
89
+ f.write("foo")
90
91
+ expected = {f.name: ('OK', None)}
92
93
94
class TestUnixSocketTimeout(TestUnixSocket):
95
kwargs = {"timeout": 20}
0 commit comments