def test_attachments(self): su = StatusUpdate('foo bar') attachments = IAttachmentStorage(su) f = ATFile('data.dat') attachments.add(f) self.assertEqual([k for k in attachments.keys()], [f.getId()]) attachments.remove(f.getId()) self.assertEqual(len(attachments.keys()), 0)
def testBlobbableEmptyATFile(self): obj = ATFile('foo') blobbable = IBlobbable(obj) target = Blob() blobbable.feed(target)