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)
                self._write(response_str.encode())
            elif dandelion.protocol.is_identity_id_list_request(data):
                tc = dandelion.protocol.parse_identity_id_list_request(data)
                tc, ids = self._db.get_identities(time_cookie=tc)
                random.shuffle(ids) # 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_identity_id_list_request('GETIDENTITYLIST {0}\n'.format(tc_str)))
        tc = dandelion.protocol.parse_identity_id_list_request('GETIDENTITYLIST {0}\n'.format(tc_str))
        self.assertEqual(tc, tc_bin)
 
        self.assertTrue(dandelion.protocol.is_identity_id_list_request('GETIDENTITYLIST\n'))
        tc = dandelion.protocol.parse_identity_id_list_request('GETIDENTITYLIST\n')
    def test_roundtrip_create_identity_id_list_request(self):
        """Test identity ID list request creation / parsing by a round trip"""
 
        tc = dandelion.protocol.parse_identity_id_list_request(dandelion.protocol.create_identity_id_list_request())
        self.assertEqual(tc, None)
 
        ex_database_id_bin = b'\x01\x03\x03\x07'
        tc = dandelion.protocol.parse_identity_id_list_request(dandelion.protocol.create_identity_id_list_request(ex_database_id_bin))