blob: f0969406f0bf8d8a2270bbdfc19bb3b43ee52f89 [file] [log] [blame]
Rich Lane1ab6f832013-05-03 17:51:35 -07001"""
2Basic test cases
3
4Test cases in other modules depend on this functionality.
5"""
6
7from oftest import config
8import oftest.base_tests as base_tests
9import ofp
10
11from oftest.testutils import *
12
13@group('smoke')
14class Echo(base_tests.SimpleProtocol):
15 """
16 Test echo response with no data
17 """
18 def runTest(self):
19 request = ofp.message.echo_request()
20 response, pkt = self.controller.transact(request)
21 self.assertTrue(response is not None,
22 "Did not get echo reply")
23 self.assertEqual(response.type, ofp.OFPT_ECHO_REPLY,
24 'response is not echo_reply')
25 self.assertEqual(request.xid, response.xid,
26 'response xid != request xid')
27 self.assertEqual(len(response.data), 0, 'response data non-empty')