Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
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)
Esempio n. 4
0
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)