def test_get_profile(self):
     doc = read_document(self.facade.get_profile())
     self.assertEquals("Mr", doc.get_title())
     self.assertEquals("manu", doc.get_firstname())
     self.assertEquals("breton", doc.get_lastname())
     self.assertEquals(QUESTION_MARK(), doc.get_photo())
     self.assertEquals("*****@*****.**", doc.get_email())
     self.assertEquals({'City': u'', 'color': u'blue', 'Country': u'',
                        'Favourite Book': u'', 'homepage': u'manu.com',
                        'Favourite Movie': u'', 'Studies': u''},
                       doc.get_custom_attributes())
 def _on_complete_profile(self, donwload_msg):
     """callback when finished downloading profile"""
     return read_document(donwload_msg.file)
Esempio n. 3
0
 def _on_complete_profile(self, file_obj):
     """callback when finished downloading profile"""
     return read_document(file_obj)
 def _on_hello(self, donwload_msg):
     """callback when autoloading of profile successful"""
     document = read_document(donwload_msg.file)
     get_facade().set_data(self.peer.peer_id, document, flag_update=False)
     get_filter_facade().fill_data(self.peer.peer_id, document)