def test_fudeclipse_syncer(self):
        create_channel_db('project1', 'cf', 'coreforum',
                'channel.syncer.common_syncers.FUDEclipseForumSyncer',
                'foo.parser',
                'http://www.eclipse.org/forums/index.php/sf/thread/13/'
                )
        create_channel_local('project1', 'coreforum',
                'channel.syncer.common_syncers.FUDEclipseForumSyncer',
                'http://www.eclipse.org/forums/index.php/sf/thread/13/'
                )
        pname = 'project1'
        cname = 'coreforum'
        toc_refresh(pname, cname)
        model = load_model(pname, STHREAD_PATH, cname)
        self.assertEqual(
                'http://www.eclipse.org/forums/index.php/sf/thread/13/1/0/',
                model.toc_sections[0].url)
        self.assertFalse(model.toc_sections[0].downloaded)

        self.assertTrue(247 >= len(model.toc_sections))
        for i in xrange(0, 247):
            self.assertEqual(i, model.toc_sections[i].index)

        toc_download_section(pname, cname, start=0, end=4)
        model = load_model(pname, STHREAD_PATH, cname)
        self.assertTrue(model.toc_sections[0].downloaded)
        self.assertTrue(model.toc_sections[1].downloaded)
        self.assertTrue(model.toc_sections[2].downloaded)
        self.assertTrue(model.toc_sections[3].downloaded)
        self.assertFalse(model.toc_sections[4].downloaded)

        self.assertEqual(160, len(model.entries))
        self.assertEqual(0, model.entries[0].index)
        self.assertFalse(model.entries[0].downloaded)
        self.assertEqual(1000, model.entries[40].index)
        self.assertEqual(1001, model.entries[41].index)
        #self.assertTrue(model.entries[26].url.find('t=59') > -1)

        toc_download_entries(pname, cname, 1039, 1040)
        model = load_model(pname, STHREAD_PATH, cname)
        self.assertTrue(model.entries[79].downloaded)
        self.assertFalse(model.entries[80].downloaded)
        path = os.path.join(settings.PROJECT_FS_ROOT,
                model.entries[79].local_paths[0])
        self.assertTrue(os.path.exists(path))
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/channel/tests.py/ChannelSetup.test_fudeclipse_syncer/swapped operands of `>=`