Beispiel #1
0
 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
Beispiel #2
0
 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']))
Beispiel #3
0
 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']))