#NEWLINE# def test_not_in_template( self ) : #NEWLINE# #INDENT# r1 = Range . objects . create ( start_str = '10.8.0.2' , end_str = '10.8.0.14' , network = self . n1 ) #NEWLINE# trs = calc_template_ranges ( self . n1 ) #NEWLINE# trs = sorted ( trs , key = ( lambda r : int ( ipaddr . IPv4Address ( r [ 'start' ] ) ) ) ) #NEWLINE# trs . pop ( 0 ) #NEWLINE# rs = integrate_real_ranges ( self . n1 , trs ) #NEWLINE# rs = sorted ( rs , key = ( lambda r : int ( ipaddr . IPv4Address ( r [ 'start' ] ) ) ) ) #NEWLINE# self . assertEqual ( r1 . start_str , rs [ 0 ] [ 'start' ] ) #NEWLINE# self . assertEqual ( r1 . end_str , rs [ 0 ] [ 'end' ] ) #NEWLINE# self . assertEqual ( r1 . pk , rs [ 0 ] [ 'pk' ] )