Beispiel #1
0
def test_pretty_print_date_empty():
    from ArgusManagedDefence import pretty_print_date

    assert pretty_print_date()
Beispiel #2
0
def test_pretty_print_date_str():
    from ArgusManagedDefence import pretty_print_date

    date_string = "Jan 01, 2000, 00:00:00"
    assert pretty_print_date(date_string) == date_string
Beispiel #3
0
def test_pretty_print_date_malformed_str():
    from ArgusManagedDefence import pretty_print_date

    date_string = "gibberish"
    assert pretty_print_date(date_string)
Beispiel #4
0
def test_pretty_print_date_datetime():
    from ArgusManagedDefence import pretty_print_date, PRETTY_DATE_FORMAT
    import datetime

    date = datetime.datetime(2000, 1, 1, 00, 00, 00)
    assert pretty_print_date(date) == date.strftime(PRETTY_DATE_FORMAT)