Exemplo n.º 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"
Exemplo n.º 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"
Exemplo n.º 3
0
def test_format_timestamp_with_milli():
    assert human.format_timestamp_with_milli(time.time())