<s> import datetime <EOL> import mock <EOL> import unittest2 <EOL> from st2client . utils . date import add_utc_tz <EOL> from st2client . utils . date import format_dt <EOL> from st2client . utils . date import format_isodate <EOL> from st2client . utils . date import format_isodate_for_user_timezone <EOL> class DateUtilsTestCase ( unittest2 . TestCase ) : <EOL> def test_format_dt ( self ) : <EOL> dt = datetime . datetime ( <NUM_LIT> , <NUM_LIT:10> , <NUM_LIT:20> , <NUM_LIT:8> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> dt = add_utc_tz ( dt ) <EOL> result = format_dt ( dt ) <EOL> self . assertEqual ( result , '<STR_LIT>' ) <EOL> def test_format_isodate ( self ) : <EOL> value = '<STR_LIT>' <EOL> result = format_isodate ( value = value ) <EOL> self . assertEqual ( result , '<STR_LIT>' ) <EOL> value = '<STR_LIT>' <EOL> result = format_isodate ( value = value , timezone = '<STR_LIT>' ) <EOL> self . assertEqual ( result , '<STR_LIT>' ) <EOL> @ mock . patch ( '<STR_LIT>' ) <EOL> def test_format_isodate_for_user_timezone ( self , mock_get_config ) : <EOL> mock_get_config . return_value = { } <EOL> value = '<STR_LIT>' <EOL> result = format_isodate_for_user_timezone ( value = value ) <EOL> self . assertEqual ( result , '<STR_LIT>' ) <EOL> mock_get_config . return_value = { '<STR_LIT>' : { '<STR_LIT>' : '<STR_LIT>' } } <EOL> value = '<STR_LIT>' <EOL> result = format_isodate_for_user_timezone ( value = value ) <EOL> self . assertEqual ( result , '<STR_LIT>' ) </s>
