<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import os <EOL> from jnpr . openclos . report import ResourceAllocationReport , L2Report , L3Report <EOL> from test_dao import InMemoryDao <EOL> class Test ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> '''<STR_LIT>''' <EOL> self . __conf = { } <EOL> self . __conf [ '<STR_LIT>' ] = os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , '<STR_LIT>' ) <EOL> self . __conf [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> self . __conf [ '<STR_LIT>' ] = '<STR_LIT:false>' <EOL> self . __conf [ '<STR_LIT>' ] = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> self . __conf [ '<STR_LIT>' ] = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] } <EOL> self . __conf [ '<STR_LIT>' ] = { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : '<STR_LIT>' <EOL> } , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : '<STR_LIT>' , <EOL> "<STR_LIT>" : '<STR_LIT>' <EOL> } <EOL> } <EOL> self . _dao = InMemoryDao . getInstance ( ) <EOL> def tearDown ( self ) : <EOL> self . _dao = None <EOL> InMemoryDao . _destroy ( ) <EOL> '''<STR_LIT>''' <EOL> def testGenerateL2Report ( self ) : <EOL> l2Report = L2Report ( self . __conf , self . _dao ) <EOL> from test_model import createPod <EOL> with self . _dao . getReadSession ( ) as session : <EOL> pod = createPod ( "<STR_LIT:test>" , session ) <EOL> l2Report . generateReport ( pod . id , True , False ) <EOL> def testGenerateL3Report ( self ) : <EOL> l3Report = L3Report ( self . __conf , self . _dao ) <EOL> from test_model import createPod <EOL> with self . _dao . getReadSession ( ) as session : <EOL> pod = createPod ( "<STR_LIT:test>" , session ) <EOL> l3Report . generateReport ( pod . id , True , False ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
