def setUp(self): EnvironmentUtil.setup_fresh_test_env() self.context = CommandContext.via({'type': 'memory-db'}) self.listCommand = ListCommand(self.context)
def get_torrents(self): list_output = ListCommand().run_command() torrent_arr = list_output.split('\n') return TorrentList([ self.parse_torrent_string(arr) for arr in torrent_arr[1, -1]])