Merge "cleanup files that are created for swift functional tests"

This commit is contained in:
Jenkins 2014-11-13 17:16:27 +00:00 committed by Gerrit Code Review
commit a4ef821438

View File

@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import uuid
from functional.common import test
@ -25,8 +26,10 @@ class ObjectV1Tests(test.TestCase):
CONTAINER_NAME = uuid.uuid4().hex
OBJECT_NAME = uuid.uuid4().hex
# NOTE(stevemar): Not using setUp since we only want this to run once
with open(OBJECT_NAME, 'w') as f:
def setUp(self):
super(ObjectV1Tests, self).setUp()
self.addCleanup(os.remove, self.OBJECT_NAME)
with open(self.OBJECT_NAME, 'w') as f:
f.write('test content')
def test_container_create(self):