<s> from django . template . defaultfilters import default_if_none <EOL> from django . test import SimpleTestCase <EOL> class FunctionTests ( SimpleTestCase ) : <EOL> def test_value ( self ) : <EOL> self . assertEqual ( default_if_none ( "<STR_LIT>" , '<STR_LIT:default>' ) , '<STR_LIT>' ) <EOL> def test_none ( self ) : <EOL> self . assertEqual ( default_if_none ( None , '<STR_LIT:default>' ) , '<STR_LIT:default>' ) <EOL> def test_empty_string ( self ) : <EOL> self . assertEqual ( default_if_none ( '<STR_LIT>' , '<STR_LIT:default>' ) , '<STR_LIT>' ) </s>
