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