コード例 #1
0
 def test_default(self):
     document = FileDocument()
     self.assertEquals(u"", document.get_title())
     self.assertEquals(u"Name", document.get_firstname())
     self.assertEquals(u"Lastname", document.get_lastname())
     self.assertEquals(QUESTION_MARK(),
                       document.get_photo())
     self.assertEquals(u"email", document.get_email())
     self.assertEquals({},
                       document.get_custom_attributes())
     # assert correct sharing
     self.assertEquals({}, document.get_shared_files())
     self.assertEquals({}, document.get_files())
     # peers
     self.assertEquals({}, document.get_peers())
     # load
     document.load_defaults()
     self.assertEquals({'City': u'', 'Country': u'',
                        'Favourite Book': u'', 'Favourite Movie': u'',
                        'Sport': u'', 'Studies': u''},
                       document.get_custom_attributes())