#NEWLINE# @ override_settings ( USE_TZ = True , TIME_ZONE = 'Europe/Berlin' ) #NEWLINE# def test_post_form_invalid_action_tz_aware( self ) : #NEWLINE# #INDENT# self . fm . actions = [ 'tests.test_views.TestAction' , 'invalid.action' ] #NEWLINE# self . fm . save ( ) #NEWLINE# response = self . client . post ( '/form/' , { #NEWLINE# #INDENT# 'string-field' : 'Some submitted string' , #NEWLINE# 'field-for-boolean' : True , #NEWLINE# 'date-and-time' : '2013-09-07 12:34:56' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( response . status_code , 302 ) #NEWLINE# self . assertRedirects ( response , '/done/' ) #NEWLINE# self . assertEqual ( TestAction . calls , 1 ) #NEWLINE# self . assertEqual ( TestAction . args [ 0 ] [ 0 ] , response . fm ) #NEWLINE# self . assertIsInstance ( TestAction . args [ 0 ] [ 1 ] , FormModelForm ) #NEWLINE# self . assertEqual ( TestAction . args [ 0 ] [ 1 ] . get_mapped_data ( ) , OrderedDict ( [ ( 'String Field' , 'Some submitted string' ) , ( 'Field for Boolean' , True ) , ( 'Date and time' , datetime . datetime ( 2013 , 9 , 7 , 12 , 34 , 56 , tzinfo = CEST ) ) ] ) )