コード例 #1
0
ファイル: test_client.py プロジェクト: ryansnyder/reporter
def test_date_filter_timezone():
    """Ensure date filters are applied in app time (= PST), not UTC."""
    dates = dict(date_start=datetime.date(2010, 1, 1),
                 date_end=datetime.date(2010, 1, 31))
    _, ranges, _ = extract_filters(dates)
    eq_(ranges['created'][0], 1262332800)  # 8:00 UTC on 1/1/2010
    # 8:00 UTC on 2/1/2010 (sic, to include all of the last day)
    eq_(ranges['created'][1], 1265011200)
コード例 #2
0
ファイル: test_client.py プロジェクト: tofumatt/reporter
def test_date_filter_timezone():
    """Ensure date filters are applied in app time (= PST), not UTC."""
    dates = dict(date_start=datetime.date(2010, 1, 1),
                 date_end=datetime.date(2010, 1, 31))
    _, ranges, _ = extract_filters(dates)
    eq_(ranges['created'][0], 1262332800)  # 8:00 UTC on 1/1/2010
    # 8:00 UTC on 2/1/2010 (sic, to include all of the last day)
    eq_(ranges['created'][1], 1265011200)
コード例 #3
0
ファイル: test_client.py プロジェクト: ryansnyder/reporter
def test_extract_filters_unknown():
    """
    Test that we return the proper value of unknown that sphinx is expecting.
    """
    _, _, metas = extract_filters(dict(platform='unknown'))
    eq_(metas['platform'], 0)
コード例 #4
0
ファイル: test_client.py プロジェクト: tofumatt/reporter
def test_extract_filters_unknown():
    """
    Test that we return the proper value of unknown that sphinx is expecting.
    """
    _, _, metas = extract_filters(dict(platform='unknown'))
    eq_(metas['platform'], 0)