def setUp(self): self.out = StringIO() self.config = torrentinfo.Config(torrentinfo.TextFormatter(False), err=self.out) path = os.path.join('test', 'files', 'missing_info.torrent') self.torrent = torrentinfo.Torrent(path, torrentinfo.load_torrent(path)) self.msg = 'Missing "info" section in %s' % self.torrent.filename
def setUp(self): super(MultiMegabyteTorrentTest, self).setUp() self.torrent = None self.file = dict() self.file['name'] = 'multi_bytes.torrent' self.file['top'] = 'multibyte' self.file['path'] = os.path.join('test', 'files', self.file['name']) self.torrent = torrentinfo.Torrent(self.file['path'], torrentinfo.load_torrent(self.file['path']))
def setUp(self): super(RegularTorrentTest, self).setUp() self.torrent = None self.file = dict() self.file['name'] = 'regular.torrent' self.file['top'] = 'torrentinfo.py' self.file['path'] = os.path.join('test', 'files', self.file['name']) self.torrent = torrentinfo.Torrent(self.file['path'], torrentinfo.load_torrent(self.file['path']))