first packet in RDP basic security layer
This commit is contained in:
@@ -26,12 +26,12 @@ import os, sys
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
||||
|
||||
import unittest
|
||||
import rdpy.network.layer
|
||||
import rdpy.core.layer
|
||||
|
||||
class LayerCase(unittest.TestCase):
|
||||
"""
|
||||
@summary: represent test case for all classes and function
|
||||
present in rdpy.network.layer
|
||||
present in rdpy.core.layer
|
||||
"""
|
||||
|
||||
class LayerCaseException(Exception):
|
||||
@@ -44,17 +44,17 @@ class LayerCase(unittest.TestCase):
|
||||
"""
|
||||
@summary: test if connect event is send from transport to presentation
|
||||
"""
|
||||
class TestConnect(rdpy.network.layer.Layer):
|
||||
class TestConnect(rdpy.core.layer.Layer):
|
||||
def connect(self):
|
||||
raise LayerCase.LayerCaseException()
|
||||
|
||||
self.assertRaises(LayerCase.LayerCaseException, rdpy.network.layer.Layer(presentation = TestConnect()).connect)
|
||||
self.assertRaises(LayerCase.LayerCaseException, rdpy.core.layer.Layer(presentation = TestConnect()).connect)
|
||||
|
||||
def test_layer_automata_more_than_expected(self):
|
||||
"""
|
||||
@summary: test layer automata mechanism if data received is more than expected
|
||||
"""
|
||||
class TestAutomata(rdpy.network.layer.RawLayer):
|
||||
class TestAutomata(rdpy.core.layer.RawLayer):
|
||||
def expectedCallBack(self, data):
|
||||
if data.dataLen() == 4:
|
||||
raise LayerCase.LayerCaseException()
|
||||
@@ -67,7 +67,7 @@ class LayerCase(unittest.TestCase):
|
||||
"""
|
||||
@summary: test layer automata mechanism
|
||||
"""
|
||||
class TestAutomata(rdpy.network.layer.RawLayer):
|
||||
class TestAutomata(rdpy.core.layer.RawLayer):
|
||||
def expectedCallBack(self, data):
|
||||
if data.dataLen() == 4:
|
||||
raise LayerCase.LayerCaseException()
|
||||
|
||||
Reference in New Issue
Block a user