def testSelection(self): self.server.simulate_connect() self.server.simulate_packet(secsgem.hsmsPacket(secsgem.hsmsSelectReqHeader(self.server.get_next_system_counter()))) self.assertIsNotNone(self.server.expect_packet(s_type=2)) self.assertEqual(self.client.connectionState.current, 'SELECTED')
def testSelection(self): self.server.simulate_connect() request_packet = self.server.expect_packet(s_type=1) self.assertIsNotNone(request_packet) self.server.simulate_packet(secsgem.hsmsPacket(secsgem.hsmsSelectRspHeader(request_packet.header.system))) self.assertEqual(self.client.connectionState.current, 'SELECTED')