<filename>tests/helpers.py
from datetime import timedelta


def strip_microseconds(date):
    return date - timedelta(microseconds=date.microsecond)


<filename>tests/helpers.py
from datetime import timedelta


def strip_microseconds(date):
    return date - timedelta(microseconds=date.microsecond)

