#NEWLINE# @ mock . patch ( 'nova.db.instance_tag_get_by_instance_uuid' ) #NEWLINE# def test_update_tag_limit_exceed( self , mock_db_get_inst_tags ) : #NEWLINE# #INDENT# fake_tags = [ self . _get_tag ( str ( req ) ) for i in xrange ( instance . MAX_TAG_COUNT ) ] #NEWLINE# mock_db_get_inst_tags . return_value = fake_tags #NEWLINE# req = self . _get_request ( ( '/v2/fake/servers/%s/tags/%s' % ( UUID , TAG2 ) ) , 'PUT' ) #NEWLINE# self . assertRaises ( exc . HTTPBadRequest , self . controller . update , req , UUID , TAG2 , body = None )