File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,20 @@ def test_instream(self):
77
77
def test_insteam_success (self ):
78
78
assert self .cd .instream (BytesIO (b"foo" )) == {'stream' : ('OK' , None )}
79
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
+ with tempfile .NamedTemporaryFile ('wb' , prefix = "python-clamd" ) as f :
89
+ f .write (b"foo" )
90
+ f .flush ()
91
+ expected = {f .name : ('OK' , None )}
92
+ assert self .cd .fdscan (f .name , f .fileno ()) == expected
93
+
80
94
81
95
class TestUnixSocketTimeout (TestUnixSocket ):
82
96
kwargs = {"timeout" : 20 }
You can’t perform that action at this time.
0 commit comments