'Tests encoding a datetime object'

def test_encode_datetime(self):

    current_time = datetime.now()
    assert (self.encoder.default(current_time) == current_time.isoformat())
    current_time_utc = current_time.replace(tzinfo=utc)
    assert (self.encoder.default(current_time_utc) == (current_time.isoformat() + 'Z'))
