예제 #1
0
app.showList = []
app.QUALITY_DEFAULT = 4  # hdtv
app.FLATTEN_FOLDERS_DEFAULT = 0

app.NAMING_PATTERN = ''
app.NAMING_ABD_PATTERN = ''
app.NAMING_SPORTS_PATTERN = ''
app.NAMING_MULTI_EP = 1

app.PROVIDER_ORDER = ["app_index"]
app.newznabProviderList = NewznabProvider.get_providers_list(
    "'Application Index|http://lolo.medusa.com/|0|5030,5040|0|eponly|0|0|0!!!NZBs.org|"
    "https://nzbs.org/||5030,5040,5060,5070,5090|0|eponly|0|0|0!!!Usenet-Crawler|"
    "https://www.usenet-crawler.com/||5030,5040,5060|0|eponly|0|0|0'")
app.providerList = providers.make_provider_list()

app.PROG_DIR = os.path.abspath(os.path.join(TEST_DIR, '..'))
app.DATA_DIR = TEST_DIR
app.CONFIG_FILE = os.path.join(app.DATA_DIR, "config.ini")
app.CFG = ConfigObj(app.CONFIG_FILE)

app.BRANCH = config.check_setting_str(app.CFG, 'General', 'branch', '')
app.CUR_COMMIT_HASH = config.check_setting_str(app.CFG, 'General',
                                               'cur_commit_hash', '')
app.GIT_USERNAME = config.check_setting_str(app.CFG, 'General', 'git_username',
                                            '')
app.GIT_PASSWORD = config.check_setting_str(app.CFG,
                                            'General',
                                            'git_password',
                                            '',
예제 #2
0
                print('SSLError on %s: %s' %
                      (_provider.name, ex(error.message)))
                raise
        except requests.exceptions.Timeout:
            print('Provider timed out')

    return _connectivity_test


class SniTests(unittest.TestCase):
    """Unittest class."""

    pass


if __name__ == "__main__":
    print("""
    ==================
    STARTING - Provider Connectivity TESTS and SSL/SNI
    ==================
    ######################################################################
    """)
    # Just checking all providers - we should make this error on non-existent urls.
    for provider in [p for p in providers.make_provider_list()]:
        test_name = 'test_%s' % provider.name
        test = generator(provider)
        setattr(SniTests, test_name, test)

    SUITE = unittest.TestLoader().loadTestsFromTestCase(SniTests)
    unittest.TextTestRunner(verbosity=2).run(SUITE)
예제 #3
0
app.QUALITY_DEFAULT = 4  # hdtv
app.SEASON_FOLDERS_DEFAULT = 1

app.NAMING_PATTERN = ''
app.NAMING_ABD_PATTERN = ''
app.NAMING_SPORTS_PATTERN = ''
app.NAMING_MULTI_EP = 1


app.PROVIDER_ORDER = ["app_index"]
app.newznabProviderList = NewznabProvider.get_providers_list(
    'Application Index|http://lolo.medusa.com/|0|5030,5040|0|eponly|0|0|0|0!!!'
    'NZBs.org|https://nzbs.org/||5030,5040,5060,5070,5090|0|eponly|0|0|0|0!!!'
    'Usenet-Crawler|https://api.usenet-crawler.com/||5030,5040,5060|0|eponly|0|0|0|0'
)
app.providerList = providers.make_provider_list()

app.PROG_DIR = os.path.abspath(os.path.join(TEST_DIR, '..'))
app.DATA_DIR = TEST_DIR
app.CONFIG_FILE = os.path.join(app.DATA_DIR, "config.ini")
app.CFG = ConfigObj(app.CONFIG_FILE)

app.BRANCH = config.check_setting_str(app.CFG, 'General', 'branch', '')
app.CUR_COMMIT_HASH = config.check_setting_str(app.CFG, 'General', 'cur_commit_hash', '')
app.GIT_USERNAME = config.check_setting_str(app.CFG, 'General', 'git_username', '')
app.GIT_PASSWORD = config.check_setting_str(app.CFG, 'General', 'git_password', '', censor_log='low')

app.LOG_DIR = os.path.join(TEST_DIR, 'Logs')
logger.log_file = os.path.join(app.LOG_DIR, 'test_application.log')
create_test_log_folder()
예제 #4
0
            else:
                print('SSLError on %s: %s' % (_provider.name, ex(error.message)))
                raise
        except requests.exceptions.Timeout:
            print('Provider timed out')

    return _connectivity_test


class SniTests(unittest.TestCase):
    """Unittest class."""

    pass


if __name__ == "__main__":
    print("""
    ==================
    STARTING - Provider Connectivity TESTS and SSL/SNI
    ==================
    ######################################################################
    """)
    # Just checking all providers - we should make this error on non-existent urls.
    for provider in [p for p in providers.make_provider_list()]:
        test_name = 'test_%s' % provider.name
        test = generator(provider)
        setattr(SniTests, test_name, test)

    SUITE = unittest.TestLoader().loadTestsFromTestCase(SniTests)
    unittest.TextTestRunner(verbosity=2).run(SUITE)