コード例 #1
0
 def test_seen_request_id(self):
     # If a message has a request ID, that has been seen before, it was
     # sent from the server to the client.
     self.assertEqual('to client',
                      infer_direction({'request_id': 1}, set([1])))
コード例 #2
0
 def test_new_request_id(self):
     # If a message has a request ID, that has not been seen yet, it was
     # sent from the client to the server.
     self.assertEqual('to server', infer_direction({'request_id': 1},
                                                   set()))
コード例 #3
0
 def test_no_request_id(self):
     # If a message has no request ID, then it was sent from the server to
     # the client.
     self.assertEqual('to client', infer_direction({}, set()))
コード例 #4
0
 def test_seen_request_id(self):
     # If a message has a request ID, that has been seen before, it was
     # sent from the server to the client.
     self.assertEqual(
         'to client',
         infer_direction({'request_id': 1}, set([1])))
コード例 #5
0
 def test_new_request_id(self):
     # If a message has a request ID, that has not been seen yet, it was
     # sent from the client to the server.
     self.assertEqual(
         'to server',
         infer_direction({'request_id': 1}, set()))
コード例 #6
0
 def test_no_request_id(self):
     # If a message has no request ID, then it was sent from the server to
     # the client.
     self.assertEqual('to client', infer_direction({}, set()))