<s> from Pyblosxom . plugins import pycalendar <EOL> import os <EOL> import unittest <EOL> import tempfile <EOL> import shutil <EOL> class PyCalendarTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . tmpdir = tempfile . mkdtemp ( ) <EOL> def tearDown ( self ) : <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> shutil . rmtree ( self . tmpdir ) <EOL> def get_datadir ( self ) : <EOL> return os . path . join ( self . tmpdir , "<STR_LIT>" ) <EOL> entry1 = { "<STR_LIT>" : ( <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT> , <NUM_LIT:15> , <NUM_LIT> , <NUM_LIT:20> , <NUM_LIT:6> , <NUM_LIT> , <NUM_LIT:0> ) } <EOL> def test_generate_calendar ( self ) : <EOL> entry1 = dict ( PyCalendarTest . entry1 ) <EOL> from Pyblosxom . pyblosxom import Request <EOL> req = Request ( { "<STR_LIT>" : self . get_datadir ( ) } , <EOL> { } , <EOL> { "<STR_LIT>" : [ entry1 ] , <EOL> "<STR_LIT>" : { } } ) <EOL> pycalendar . cb_prepare ( { "<STR_LIT>" : req } ) <EOL> data = req . get_data ( ) <EOL> cal = data [ "<STR_LIT>" ] <EOL> cal . generate_calendar ( ) </s>
