Beispiel #1
0
def test_setup_query_parameters_1():
    """setup_query_parameters_1 - does it make the right query for single product"""
    conf = sutil.DotDict()
    conf.day = dt.date(2011, 1, 25)
    conf.product = 'Firefloozy'
    conf.version = ''
    result = dailyUrl.setup_query_parameters(conf)
    exp.assert_expected(result.now_str, "2011-01-26")
    exp.assert_expected(result.yesterday_str, "2011-01-25")
    exp.assert_expected(result.prod_phrase, "and r.product = 'Firefloozy'")
    exp.assert_expected(result.ver_phrase, "")
Beispiel #2
0
def test_process_crash():
    """test_process_crash - test record fixups"""
    id_cache = exp.DummyObjectWithExpectations()
    id_cache.expect('getAppropriateOsVersion', ('Windows NT', '4.0'), {}, 'XXX')
    result = dailyUrl.process_crash(raw_row, id_cache)
    exp.assert_expected(result, exp_row)