def test_pretty_print_date_empty(): from ArgusManagedDefence import pretty_print_date assert pretty_print_date()
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
def test_pretty_print_date_malformed_str(): from ArgusManagedDefence import pretty_print_date date_string = "gibberish" assert pretty_print_date(date_string)
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)