#NEWLINE# def test2_create( self ) : #NEWLINE# #INDENT# mac = '13:22:33:44:55:66' #NEWLINE# label = 'foo' #NEWLINE# domain = self . f_c #NEWLINE# ip_str = '10.0.0.2' #NEWLINE# kwargs = { #NEWLINE# #INDENT# 'mac' : mac , #NEWLINE# 'label' : label , #NEWLINE# 'domain' : domain , #NEWLINE# 'ip_str' : ip_str , #NEWLINE# #UNINDENT# } #NEWLINE# intr = self . do_add ( ** kwargs ) #NEWLINE# intr . update_attrs ( ) #NEWLINE# intr . attrs . primary = '2' #NEWLINE# self . assertEqual ( intr . attrs . primary , '2' ) #NEWLINE# self . assertEqual ( intr . attrs . cache [ 'primary' ] , '2' ) #NEWLINE# del intr . attrs . primary #NEWLINE# def bad_get( ) : #NEWLINE# #INDENT# intr . attrs . primary #NEWLINE# #UNINDENT# self . assertRaises ( AttributeError , bad_get ) #NEWLINE# intr . attrs . primary = '3' #NEWLINE# self . assertEqual ( kwargs . attrs . primary , '3' ) #NEWLINE# self . assertEqual ( intr . attrs . cache [ 'primary' ] , '3' )