コード例 #1
0
 def test_remote_link(self):
     link = 'dummy'
     user = User(remote_url='http://microblog.brianschrader.com/feed')
     try:
         # should fail.
         user.link = link
         self.fail('setting a remote user should be forbidden.')
     except:
         pass
コード例 #2
0
 def test_local_link(self):
     link = 'http://example.com'
     user = User(local_url='user/feed.xml')
     try:
         user.link = link
     except Exception as e:
         print e
         self.fail('Setting local user link failed.')
     self.assertEqual(user.link, link)
コード例 #3
0
 def test_cached_link(self):
     link = 'http://example.com'
     user = User(entries={ 'link': link })
     link = 'http://example.net'
     try:
         user.link = link
     except Exception as e:
         print e
         self.fail('Setting cached link failed.')
     self.assertEqual(user.link, link)