示例#1
0
def maybe_timestamp(base, attr):
    if base is not None and getattr(base, attr):
        return human.format_timestamp_with_milli(getattr(base, attr))
    else:
        return "active"
示例#2
0
def maybe_timestamp(base, attr):
    if base is not None and getattr(base, attr):
        return human.format_timestamp_with_milli(getattr(base, attr))
    else:
        return "active"
示例#3
0
def test_format_timestamp_with_milli():
    assert human.format_timestamp_with_milli(time.time())