Esempio n. 1
0
def test_get_reports():
    actual = _get_reports('tests/data/kr')
    expected = [
        {
            "title": "Crash Count",
            "publish_date": "2018-01-01",
            "author": "Joseph Blowseph",
            "file": "not_index.html",
            "path": "tests/data/kr/crash_count/not_index.html",
            "dir": "tests/data/kr/crash_count",
            "abstract": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
        },
        {
            "title": "User Count",
            "publish_date": "2018-01-02",
            "author": "Joe Blow",
            "file": "index.html",
            "path": "tests/data/kr/user_count/index.html",
            "dir": "tests/data/kr/user_count",
        },
        {
            "title": "Mozilla Manifesto",
            "publish_date": "2018-01-01",
            "author": "Mitchell Baker",
            "file": "index.html",
            "link": "https://www.mozilla.org/en-US/about/manifesto/",
            "path": "https://www.mozilla.org/en-US/about/manifesto/",
            "abstract": "The open, global internet is the most powerful communication and collaboration resource we have ever seen."
        },
        {
            "title": "My First TOML Report",
            "publish_date": "2018-01-02",
            "author": "Tom",
            "file": "index.html",
            "path": "tests/data/kr/toml_report/index.html",
            "dir": "tests/data/kr/toml_report",
        },
        {
            "title": "Just Another JSON Report",
            "publish_date": "2018-01-02",
            "author": "Joe Blow",
            "file": "index.html",
            "path": "tests/data/kr/json_toml_report/index.html",
            "dir": "tests/data/kr/json_toml_report",
        },
    ]

    assert compare_report_lists(actual, expected)
Esempio n. 2
0
def test_get_reports():
    actual = _get_reports('tests/data/kr')
    expected = [
        {
            "title": "Crash Count",
            "publish_date": "2018-01-01",
            "author": "Joseph Blowseph",
            "file": "not_index.html",
            "path": "tests/data/kr/crash_count/not_index.html",
            "dir": "tests/data/kr/crash_count",
        },
        {
            "title": "User Count",
            "publish_date": "2018-01-02",
            "author": "Joe Blow",
            "file": "index.html",
            "path": "tests/data/kr/user_count/index.html",
            "dir": "tests/data/kr/user_count",
        },
    ]

    assert compare_report_lists(actual, expected)
Esempio n. 3
0
def reports():
    return (_get_reports(KR))
Esempio n. 4
0
def reports():
    return [Report.from_dict(r) for r in _get_reports(KR)]