Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/d/a/Dandelion-Message-Service-HEAD/dandelionpy/dandelion/network.py   Dandelion-Message-Service(Download)
 
            if dandelion.protocol.is_message_id_list_request(data):
                tc = dandelion.protocol.parse_message_id_list_request(data)
                tc, msgs = self._db.get_messages(time_cookie=tc)
                random.shuffle(msgs) # To avoid last piece problem

src/d/a/Dandelion-Message-Service-HEAD/dandelionpy/dandelion/test/protocol_test.py   Dandelion-Message-Service(Download)
 
        self.assertTrue(dandelion.protocol.is_message_id_list_request('GETMESSAGELIST {0}\n'.format(tc_str)))
        tc = dandelion.protocol.parse_message_id_list_request('GETMESSAGELIST {0}\n'.format(tc_str))
        self.assertEqual(tc, tc_bin)
 
        self.assertTrue(dandelion.protocol.is_message_id_list_request('GETMESSAGELIST\n'))
        tc = dandelion.protocol.parse_message_id_list_request('GETMESSAGELIST\n')
    def test_roundtrip_create_message_id_list_request(self):
        """Test message ID list request creation / parsing by a round trip"""
 
        tc = dandelion.protocol.parse_message_id_list_request(dandelion.protocol.create_message_id_list_request())
        self.assertEqual(tc, None)
 
        ex_database_id_bin = b'\x01\x03\x03\x07'
        tc = dandelion.protocol.parse_message_id_list_request(dandelion.protocol.create_message_id_list_request(ex_database_id_bin))