Exemplo n.º 1
0
def _get_source_description(source):
    """Returns document source description.

    """
    for source_cfg in config.get_sources():
        if source_cfg.name == source:
            return source_cfg.description
    return source
Exemplo n.º 2
0
def _get_source_description(source):
    """Returns document source description.

    """
    for source_cfg in config.get_sources():
        if source_cfg.name == source:
            return source_cfg.description
    return source
Exemplo n.º 3
0
def _test_archive_config():
    """Test archive configuration."""
    import pyesdoc.archive.config as cfg

    tu.assert_path(cfg.get_directory())
    tu.assert_int(cfg.get_projects(), 6)
    tu.assert_int(cfg.get_sources(), 4)
    tu.assert_int(cfg.get_projects()[0].feeds, 2)
    tu.assert_int(cfg.get_projects()[1].feeds, 1)
    tu.assert_int(cfg.get_projects()[2].feeds, 1)
    tu.assert_int(cfg.get_projects()[3].feeds, 1)
    tu.assert_int(cfg.get_projects()[4].feeds, 1)
    tu.assert_int(cfg.get_project_sources(), 7)