<commit_before>from __future__ import unicode_literals, division, absolute_import

from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest

from tests import FlexGetBase


class TestInputSites(FlexGetBase):

    __yaml__ = """
        tasks:
          test_rlslog:
            rlslog: http://www.rlslog.net/category/movies/dvdrip/
          test_sceper:
            sceper: http://sceper.ws/category/movies/movies-dvd-rip
          test_apple_trailers:
              apple_trailers: 480p
    """

    @attr(online=True)
    def test_rlslog(self):
        self.execute_task('test_rlslog')
        assert self.task.entries, 'no entries created / site may be down'

    @attr(online=True)
    def test_sceper(self):
        self.execute_task('test_sceper')
        assert self.task.entries, 'no entries created / site may be down'

    @attr(online=True)
    def test_apple_trailers(self):
        raise SkipTest('apple_trailers plugin is currently broken')
        self.execute_task('test_apple_trailers')
        assert self.task.entries, 'no entries created / site may be down'<commit_msg>Reenable apple_trailers unit test<commit_after>from __future__ import unicode_literals, division, absolute_import

from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest

from tests import FlexGetBase


class TestInputSites(FlexGetBase):

    __yaml__ = """
        tasks:
          test_rlslog:
            rlslog: http://www.rlslog.net/category/movies/dvdrip/
          test_sceper:
            sceper: http://sceper.ws/category/movies/movies-dvd-rip
          test_apple_trailers:
            apple_trailers:
              quality: 480p
              genres: ['Action and Adventure']
    """

    @attr(online=True)
    def test_rlslog(self):
        self.execute_task('test_rlslog')
        assert self.task.entries, 'no entries created / site may be down'

    @attr(online=True)
    def test_sceper(self):
        self.execute_task('test_sceper')
        assert self.task.entries, 'no entries created / site may be down'

    @attr(online=True)
    def test_apple_trailers(self):
        self.execute_task('test_apple_trailers')
        assert self.task.entries, 'no entries created / site may be down'
{'fraction_non_alphanumeric': 0.09204647006255585, 'fraction_numerical': 0.002680965147453083, 'mean_word_length': 2.7884940778341796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5906862', 'n_tokens_mistral': 718, 'n_tokens_neox': 684, 'n_words': 153}