Beispiel #1
0
    def _initialize_meta_messages(self):
        Community._initialize_meta_messages(self)

        ori = self._meta_messages[u"dispersy-introduction-request"]
        self._disp_intro_handler = ori.handle_callback
        
        new = Message(self, ori.name, ori.authentication, ori.resolution, ori.distribution, ori.destination, TasteIntroPayload(), ori.check_callback, self.on_taste_intro)
        self._meta_messages[u"dispersy-introduction-request"] = new
    def _initialize_meta_messages(self):
        Community._initialize_meta_messages(self)

        ori = self._meta_messages[u"dispersy-introduction-request"]
        self._disp_intro_handler = ori.handle_callback

        new = Message(self, ori.name, ori.authentication, ori.resolution, ori.distribution, ori.destination, TasteIntroPayload(), ori.check_callback, self.on_taste_intro)
        self._meta_messages[u"dispersy-introduction-request"] = new
Beispiel #3
0
 def test_get_statistics_no_community(self):
     """
     Testing whether the API returns error 404 if no trustchain community is loaded
     """
     dummy_master_member = DummyMember(self.dispersy, 1, "b" * 20)
     Community.__abstractmethods__ = frozenset()
     self.dispersy.get_communities = lambda: [Community(self.dispersy, dummy_master_member, self.member),
                                              Community(self.dispersy, dummy_master_member, self.member)]
     return self.do_request('trustchain/statistics', expected_code=404)
Beispiel #4
0
 def dispersy_claim_sync_bloom_filter(self, request_cache):
     if self._sync_cache:
         self._sync_cache.responses_received = -1
     return Community.dispersy_claim_sync_bloom_filter(self, request_cache)
Beispiel #5
0
 def dispersy_claim_sync_bloom_filter(self, request_cache):
     if self._sync_cache:
         self._sync_cache.responses_received = -1
     return Community.dispersy_claim_sync_bloom_filter(self, request_cache)