fix test_s3 FLAGS uses

This commit is contained in:
Chris Behrens 2011-08-03 12:26:51 -07:00
parent 8efe41aaa4
commit 25655e0bce
2 changed files with 1 additions and 12 deletions

View File

@ -22,14 +22,11 @@ import webob.dec
from nova import test
from nova import context
from nova import flags
from nova.api.openstack.limits import RateLimitingMiddleware
from nova.api.openstack.common import limited
from nova.tests.api.openstack import fakes
from webob import Request
FLAGS = flags.FLAGS
@webob.dec.wsgify
def simple_wsgi(req):

View File

@ -16,12 +16,9 @@
# under the License.
from nova import context
from nova import flags
from nova import test
from nova.image import s3
FLAGS = flags.FLAGS
ami_manifest_xml = """<?xml version="1.0" ?>
<manifest>
@ -59,15 +56,10 @@ ami_manifest_xml = """<?xml version="1.0" ?>
class TestS3ImageService(test.TestCase):
def setUp(self):
super(TestS3ImageService, self).setUp()
self.orig_image_service = FLAGS.image_service
FLAGS.image_service = 'nova.image.fake.FakeImageService'
self.flags(image_service='nova.image.fake.FakeImageService')
self.image_service = s3.S3ImageService()
self.context = context.RequestContext(None, None)
def tearDown(self):
super(TestS3ImageService, self).tearDown()
FLAGS.image_service = self.orig_image_service
def _assertEqualList(self, list0, list1, keys):
self.assertEqual(len(list0), len(list1))
key = keys[0]