#NEWLINE# def test_shortcut_dict_representation( self ) : #NEWLINE# #INDENT# 'If precision is the default value, to_dict should return a string' #NEWLINE# date_str = '2013-11-17T01:03:05' #NEWLINE# d = DateTimeWithPrecision ( ) #NEWLINE# d . precision = 'second' #NEWLINE# d . value = date_str #NEWLINE# self . assertEqual ( str , type ( d . to_dict ( ) ) ) #NEWLINE# self . assertEqual ( datetime , type ( d . value ) ) #NEWLINE# self . assertEqual ( date_str , d . to_dict ( ) ) #NEWLINE# d2 = cybox . test . round_trip ( d , output = True ) #NEWLINE# self . assertEqual ( d . to_dict ( ) , d2 . to_dict ( ) )