Esempio n. 1
0
def test_date_time_to_epoch_milliseconds_str():
    from ArgusManagedDefence import date_time_to_epoch_milliseconds
    import datetime

    timestamp = int(
        datetime.datetime(2000, 1, 1, 00, 00, 00).timestamp() * 1000)
    assert date_time_to_epoch_milliseconds("2000-01-01 00:00:00") == timestamp
Esempio n. 2
0
def test_date_time_to_epoch_milliseconds_datetime():
    from ArgusManagedDefence import date_time_to_epoch_milliseconds
    import datetime

    date = datetime.datetime(2000, 1, 1, 00, 00, 00)
    timestamp = date.timestamp() * 1000
    assert date_time_to_epoch_milliseconds(date) == timestamp
Esempio n. 3
0
def test_date_time_to_epoch_milliseconds_empty():
    from ArgusManagedDefence import date_time_to_epoch_milliseconds

    assert date_time_to_epoch_milliseconds()
Esempio n. 4
0
def test_date_time_to_epoch_milliseconds_malformed_str():
    from ArgusManagedDefence import date_time_to_epoch_milliseconds

    assert date_time_to_epoch_milliseconds("gibberish")