<s> import unittest <EOL> from amonone . web . template import * <EOL> from nose . tools import eq_ <EOL> class TestTemplateFilters ( unittest . TestCase ) : <EOL> def test_dateformat ( self ) : <EOL> date = dateformat ( <NUM_LIT> ) <EOL> eq_ ( '<STR_LIT>' , date ) <EOL> def test_timeformat ( self ) : <EOL> time = timeformat ( <NUM_LIT> ) <EOL> eq_ ( '<STR_LIT>' , time ) <EOL> def test_date_to_js ( self ) : <EOL> date = date_to_js ( <NUM_LIT> ) <EOL> eq_ ( '<STR_LIT>' , date ) <EOL> def test_to_int ( self ) : <EOL> _int = to_int ( '<STR_LIT>' ) <EOL> eq_ ( _int , <NUM_LIT:2> ) <EOL> def test_clean_string ( self ) : <EOL> string = clean_string ( '<STR_LIT>' ) <EOL> eq_ ( string , <NUM_LIT> ) <EOL> def test_progress_width_percent ( self ) : <EOL> full_container = progress_width_percent ( <NUM_LIT:100> , container_type = '<STR_LIT>' ) <EOL> eq_ ( full_container , '<STR_LIT>' ) <EOL> full_container = progress_width_percent ( <NUM_LIT:50> , container_type = '<STR_LIT>' ) <EOL> eq_ ( full_container , '<STR_LIT>' ) <EOL> full_container = progress_width_percent ( <NUM_LIT:0> , container_type = '<STR_LIT>' ) <EOL> eq_ ( full_container , '<STR_LIT>' ) <EOL> container = progress_width_percent ( <NUM_LIT:100> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container , '<STR_LIT>' ) <EOL> container = progress_width_percent ( <NUM_LIT:50> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container , '<STR_LIT>' ) <EOL> container = progress_width_percent ( <NUM_LIT:0> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container , '<STR_LIT>' ) <EOL> container = progress_width_percent ( <NUM_LIT:100> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container , '<STR_LIT>' ) <EOL> container = progress_width_percent ( <NUM_LIT:50> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container , '<STR_LIT>' ) <EOL> def test_progress_width ( self ) : <EOL> full_container = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( full_container , '<STR_LIT>' ) <EOL> full_container_50 = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( full_container_50 , '<STR_LIT>' ) <EOL> full_container_0 = progress_width ( <NUM_LIT:0> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( full_container_0 , '<STR_LIT>' ) <EOL> medium_container = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( medium_container , '<STR_LIT>' ) <EOL> medium_container_50 = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( medium_container_50 , '<STR_LIT>' ) <EOL> medium_container_0 = progress_width ( <NUM_LIT:0> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( medium_container_0 , '<STR_LIT>' ) <EOL> small_container = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( small_container , '<STR_LIT>' ) <EOL> small_container_50 = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( small_container_50 , '<STR_LIT>' ) <EOL> small_container_0 = progress_width ( <NUM_LIT:0> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( small_container_0 , '<STR_LIT>' ) <EOL> def test_progress_width_with_zeroes ( self ) : <EOL> empty_container_full = progress_width ( <NUM_LIT:0> , <NUM_LIT:0> , container_type = '<STR_LIT>' ) <EOL> eq_ ( empty_container_full , '<STR_LIT>' ) <EOL> empty_container_medium = progress_width ( <NUM_LIT:0> , <NUM_LIT:0> , container_type = '<STR_LIT>' ) <EOL> eq_ ( empty_container_medium , '<STR_LIT>' ) <EOL> empty_container_small = progress_width ( <NUM_LIT:0> , <NUM_LIT:0> , container_type = '<STR_LIT>' ) <EOL> eq_ ( empty_container_small , '<STR_LIT>' ) <EOL> def test_value_bigger_than_total ( self ) : <EOL> container_full = progress_width ( <NUM_LIT> , <NUM_LIT:0> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container_full , '<STR_LIT>' ) <EOL> def test_with_big_numbers ( self ) : <EOL> container_full = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container_full , '<STR_LIT>' ) <EOL> container = progress_width ( <NUM_LIT:9> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container , '<STR_LIT>' ) <EOL> container_full = progress_width ( <NUM_LIT> , <NUM_LIT> , container_type = '<STR_LIT>' ) <EOL> eq_ ( container_full , '<STR_LIT>' ) <EOL> def test_url ( self ) : <EOL> _url = url ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> eq_ ( _url , '<STR_LIT>' ) <EOL> def test_base_url ( self ) : <EOL> _base_url = base_url ( ) <EOL> assert isinstance ( _base_url , str ) <EOL> def test_check_additional_data ( self ) : <EOL> ignored_dicts = [ { '<STR_LIT>' : <NUM_LIT> } , { '<STR_LIT>' : <NUM_LIT> } ] <EOL> check_ignored_dicts = check_additional_data ( ignored_dicts ) <EOL> eq_ ( check_ignored_dicts , None ) <EOL> true_dicts = [ { '<STR_LIT>' : <NUM_LIT> , '<STR_LIT:test>' : '<STR_LIT>' } , { '<STR_LIT>' : <NUM_LIT> } ] <EOL> check_true_dicts = check_additional_data ( true_dicts ) <EOL> eq_ ( check_true_dicts , True ) <EOL> def test_cleanup_string ( self ) : <EOL> string = '<STR_LIT>' <EOL> clean = clean_slashes ( string ) <EOL> eq_ ( clean , '<STR_LIT:test>' ) </s>
