<s> '''<STR_LIT>''' <EOL> import unittest <EOL> from nose . tools import * <EOL> from framework . forms . utils import process_payload <EOL> from website . project . model import MetaSchema <EOL> from website . project . model import ensure_schemas <EOL> from website . project . metadata . schemas import OSF_META_SCHEMAS <EOL> from tests . base import OsfTestCase <EOL> class TestMetaData ( OsfTestCase ) : <EOL> def test_ensure_schemas ( self ) : <EOL> assert_equal ( <EOL> MetaSchema . find ( ) . count ( ) , <EOL> <NUM_LIT:0> <EOL> ) <EOL> ensure_schemas ( ) <EOL> assert_equal ( <EOL> MetaSchema . find ( ) . count ( ) , <EOL> len ( OSF_META_SCHEMAS ) <EOL> ) <EOL> def test_process ( self ) : <EOL> processed = process_payload ( { '<STR_LIT:foo>' : '<STR_LIT>' } ) <EOL> assert_equal ( processed [ '<STR_LIT:foo>' ] , '<STR_LIT>' ) <EOL> def test_process_list ( self ) : <EOL> processed = process_payload ( { '<STR_LIT:foo>' : [ '<STR_LIT:bar>' , '<STR_LIT>' ] } ) <EOL> assert_equal ( processed [ '<STR_LIT:foo>' ] [ <NUM_LIT:1> ] , '<STR_LIT>' ) <EOL> def test_process_whitespace ( self ) : <EOL> processed = process_payload ( { '<STR_LIT:foo>' : '<STR_LIT>' } ) <EOL> assert_equal ( processed [ '<STR_LIT:foo>' ] , '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
