Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Francis Labelle committed Mar 31, 2021
1 parent 9bf9a96 commit 15e72b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/test_DeviceRedirectionMITM.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def setUp(self):
self.state = Mock()
self.state.config = MagicMock()
self.state.config.outDir = Path("/tmp")
self.mitm = DeviceRedirectionMITM(self.client, self.server, self.log, self.statCounter, self.state)
self.mitm = DeviceRedirectionMITM(self.client, self.server, self.log, self.statCounter, self.state, Mock())

@patch("pyrdp.mitm.FileMapping.FileMapping.generate")
def sendCreateResponse(self, request, response, generate):
Expand Down
1 change: 1 addition & 0 deletions test/test_FileMapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def createMapping(self, mkdir: MagicMock, mkstemp: MagicMock, mock_open_object):
mkstemp.return_value = (1, str(self.outDir / "tmp" / "tmp_test"))
mapping = FileMapping.generate("/test", self.outDir, Path("filesystems"), self.log)
mapping.getSha1Hash = Mock(return_value = self.hash)
mapping.file.closed = False
return mapping, mkdir, mkstemp, mock_open_object

def test_generate_createsTempFile(self):
Expand Down
2 changes: 1 addition & 1 deletion test/test_X224MITM.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pyrdp.pdu import X224ConnectionRequestPDU, NegotiationRequestPDU


class FileMappingTest(unittest.TestCase):
class X224MITMTest(unittest.TestCase):
def setUp(self):
self.mitm = X224MITM(Mock(), Mock(), Mock(), Mock(), Mock(), MagicMock())

Expand Down

0 comments on commit 15e72b1

Please sign in to comment.