def test_decode_timestamp_value(self): self.assertEqual(decode.timestamp(b'\x00\x00\x00\x00Ec)\x92')[1], time.struct_time((2006, 11, 21, 16, 30, 10, 1, 325, 0)))
def test_decode_timestamp_data_type(self): self.assertIsInstance(decode.timestamp(b'\x00\x00\x00\x00Ec)\x92')[1], time.struct_time)
def test_decode_timestamp_value(self): self.assertEqual( decode.timestamp(b'\x00\x00\x00\x00Ec)\x92')[1], datetime.datetime(2006, 11, 21, 16, 30, 10))
def test_decode_timestamp_bytes_consumed(self): self.assertEqual(decode.timestamp(b'\x00\x00\x00\x00Ec)\x92')[0], 8)
def test_decode_timestamp_milliseconds(self): self.assertIsInstance( decode.timestamp(b'\x00\x00\x01w\xf7\xdb\xcfg')[1], datetime.datetime)