def test_writeAddsTimestamp(self):
        logger = MemoryLogger()
        msg = Message.new(key=4)
        timestamp = 1387299889.153187625
        msg._time = lambda: timestamp
        msg.write(logger)
        self.assertEqual(logger.messages[0]["timestamp"], timestamp)
L{Message.write} adds a C{"timestamp"} field to the dictionary written
dataset/ETHPy150Open ClusterHQ/eliot/eliot/tests/test_message.py/MessageTests.test_writeAddsTimestamp