def test_AddRetrieveValues( self ): cm = ConfigManager() cm[ 'MyFace' ] = 'The Best' cm.YourFace = 'Fugly' self.assertEqual( cm[ 'MyFace' ], 'The Best' ) self.assertEqual( cm[ 'YourFace' ], 'Fugly' ) self.assertEqual( cm.MyFace, 'The Best' ) self.assertEqual( cm.YourFace, 'Fugly' )
def test_DataTypes( self ): cm = ConfigManager() cm.ABool = True cm.AnotherBool = False cm.AnInt = 100 assert( cm.ABool is True ) assert( cm.AnotherBool is False ) assert( isinstance( cm.AnInt, int ) ) self.assertEqual( cm.AnInt, 100 )