'Serializes datetime values using Django REST Framework\'s encoder.
Use this to simplify equality assertions.'

@classmethod
def _serialize_datetime(cls, dt):

    if dt:
        return JSONEncoder().default(dt)
    return None
