@transaction.autocommit
    def test_fudeclipse_parser(self):
        create_channel_db('project1', 'cf', 'coreforum',
                'channel.syncer.common_syncers.FUDEclipseForumSyncer',
                'channel.parser.common_parsers.FUDEclipseForumParser',
                'http://www.eclipse.org/forums/index.php/sf/thread/59/'
                )
        create_channel_local('project1', 'coreforum',
                'channel.syncer.common_syncers.FUDEclipseForumSyncer',
                'http://www.eclipse.org/forums/index.php/sf/thread/59/'
                )
        pname = 'project1'
        cname = 'coreforum'
        toc_refresh(pname, cname)
        toc_download_section(pname, cname, start=0, end=2)
        toc_download_entries(pname, cname, 0, 6)
        parse_channel(pname, cname, True)
        self.assertEqual(18, Message.objects.all().count())
        messages = list(Message.objects.all())
        for message in messages:
            print('{0} by {1} on {2} (wc: {3})'.format(
                message.title, message.author, message.msg_date,
                message.word_count))
            print('  {0} snippets and {1} references'.format(
                message.code_snippets.count(),
                message.code_references.count()))
            print('  Snippets:')
            for code_snippet in message.code_snippets.all():
                print('    {0}'.format(code_snippet.language))

            for ref in message.code_references.all():
                print('    {0}: {1}'.format(ref.kind_hint.kind, ref.content))
        
        first_message = messages[0]

        # Test Title
        self.assertEqual(first_message.title, 
            'looping back to a previous step')

        # Test Author
        self.assertEqual(first_message.author.nickname, 'No real name')

        # Test Date
        self.assertEqual(first_message.msg_date, datetime(2010, 8, 26, 7, 50))

        # Test Refs
        refs = [ref.content.strip() for ref in
                first_message.code_references.all()]
        self.assertEqual(3, len(refs))
        self.assertTrue(refs in 'ActivityElements')
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/channel/tests.py/ChannelParserTest.test_fudeclipse_parser/swapped operands of `in`