def test_shortcut_dict_representation(self):
        date_str = "2013-11-17T01:03:05"
        d = DateTimeWithPrecision()
        d.precision = "second"
        d.value = date_str

        self.assertEqual(str, type(d.to_dict()))
        self.assertEqual(datetime, type(d.value))
        self.assertEqual(date_str, d.to_dict())

        d2 = cybox.test.round_trip(d, output=True)
        self.assertEqual(d.to_dict(), d2.to_dict())
If precision is the default value, to_dict should return a string
dataset/ETHPy150Open CybOXProject/python-cybox/cybox/test/common/datetimewithprecision_test.py/TestDateTimeWithPrecision.test_shortcut_dict_representation