<s> from datetime import time <EOL> from django . template . defaultfilters import time as time_filter <EOL> from django . test import SimpleTestCase , override_settings <EOL> from django . utils import timezone , translation <EOL> from . . utils import setup <EOL> from . timezone_utils import TimezoneTestCase <EOL> class TimeTests ( TimezoneTestCase ) : <EOL> """<STR_LIT>""" <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time00 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : time ( <NUM_LIT:16> , <NUM_LIT> ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ override_settings ( USE_L10N = True ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time00_l10n ( self ) : <EOL> with translation . override ( '<STR_LIT>' ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : time ( <NUM_LIT:16> , <NUM_LIT> ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time01 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : self . now_tz_i } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time02 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : self . now } ) <EOL> self . assertEqual ( output , '<STR_LIT::>' + self . now_tz . tzinfo . tzname ( self . now_tz ) ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time03 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT:t>' : time ( <NUM_LIT:4> , <NUM_LIT:0> , tzinfo = timezone . get_fixed_timezone ( <NUM_LIT:30> ) ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time04 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT:t>' : time ( <NUM_LIT:4> , <NUM_LIT:0> ) } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time05 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT:d>' : self . today } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> @ setup ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> def test_time06 ( self ) : <EOL> output = self . engine . render_to_string ( '<STR_LIT>' , { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> self . assertEqual ( output , '<STR_LIT>' ) <EOL> class FunctionTests ( SimpleTestCase ) : <EOL> def test_inputs ( self ) : <EOL> self . assertEqual ( time_filter ( time ( <NUM_LIT> ) , '<STR_LIT:h>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( time_filter ( time ( <NUM_LIT:0> ) , '<STR_LIT:h>' ) , '<STR_LIT>' ) </s>
