#NEWLINE# def test_refresh( self ) : #NEWLINE# #INDENT# updated_secgroup = dict ( fake_secgroup , description = 'changed' ) #NEWLINE# self . mox . StubOutWithMock ( db , 'security_group_get' ) #NEWLINE# db . security_group_get ( self . context , 1 ) . AndReturn ( updated_secgroup ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# secgroup = security_group . SecurityGroup . _from_db_object ( self . context , security_group . SecurityGroup ( self . context ) , fake_secgroup ) #NEWLINE# secgroup . refresh ( ) #NEWLINE# self . assertEqual ( self . _fix_deleted ( secgroup ) , dict ( secgroup . items ( ) ) ) #NEWLINE# self . assertEqual ( secgroup . obj_what_changed ( ) , set ( ) )