Delete unused test check

TrivialFix

Change-Id: Id93a5062c48e99afc22594f05cbf29cffce2494e
This commit is contained in:
zhongjun 2017-09-14 15:06:31 +08:00 committed by Tom Barron
parent a7cf5117bc
commit 6d29762f87
7 changed files with 17 additions and 60 deletions

View File

@ -23,7 +23,6 @@ from manila.api.v1 import share_snapshots
from manila.common import constants
from manila import context
from manila import db
from manila import exception
from manila.share import api as share_api
from manila import test
from manila.tests.api.contrib import stubs
@ -386,14 +385,8 @@ class ShareSnapshotAdminActionsAPITest(test.TestCase):
# validate response code and model status
self.assertEqual(valid_code, resp.status_int)
if valid_code == 404:
self.assertRaises(exception.NotFound,
db_access_method,
ctxt,
model['id'])
else:
actual_model = db_access_method(ctxt, model['id'])
self.assertEqual(valid_status, actual_model['status'])
actual_model = db_access_method(ctxt, model['id'])
self.assertEqual(valid_status, actual_model['status'])
@ddt.data(*fakes.fixture_reset_status_with_different_roles_v1)
@ddt.unpack

View File

@ -597,11 +597,5 @@ class ShareGroupSnapshotAPITest(test.TestCase):
# Validate response code and model status
self.assertEqual(valid_code, resp.status_int)
if valid_code == 404:
self.assertRaises(exception.NotFound,
db.share_group_snapshot_get,
ctxt,
group_snap['id'])
else:
actual_model = db.share_group_snapshot_get(ctxt, group_snap['id'])
self.assertEqual(valid_status, actual_model['status'])
actual_model = db.share_group_snapshot_get(ctxt, group_snap['id'])
self.assertEqual(valid_status, actual_model['status'])

View File

@ -937,13 +937,8 @@ class ShareGroupAPITest(test.TestCase):
# validate response code and model status
self.assertEqual(valid_code, resp.status_int)
if valid_code == 404:
self.assertRaises(
exception.NotFound,
db.share_group_get, ctxt, share_group['id'])
else:
actual_model = db.share_group_get(ctxt, share_group['id'])
self.assertEqual(valid_status, actual_model['status'])
actual_model = db.share_group_get(ctxt, share_group['id'])
self.assertEqual(valid_status, actual_model['status'])
@ddt.data(*fakes.fixture_force_delete_with_different_roles)
@ddt.unpack

View File

@ -249,14 +249,8 @@ class ShareInstancesAPITest(test.TestCase):
# validate response code and model status
self.assertEqual(valid_code, resp.status_int)
if valid_code == 404:
self.assertRaises(exception.NotFound,
db_access_method,
ctxt,
model['id'])
else:
actual_model = db_access_method(ctxt, model['id'])
self.assertEqual(valid_status, actual_model['status'])
actual_model = db_access_method(ctxt, model['id'])
self.assertEqual(valid_status, actual_model['status'])
@ddt.data(*fakes.fixture_reset_status_with_different_roles)
@ddt.unpack

View File

@ -580,15 +580,9 @@ class ShareReplicasApiTest(test.TestCase):
# validate response code and model status
self.assertEqual(valid_code, resp.status_int)
if valid_code == 404:
self.assertRaises(exception.ShareReplicaNotFound,
share_replicas.db.share_replica_get,
context,
replica['id'])
else:
actual_replica = share_replicas.db.share_replica_get(
context, replica['id'])
self.assertEqual(valid_status, actual_replica[status_attr])
actual_replica = share_replicas.db.share_replica_get(
context, replica['id'])
self.assertEqual(valid_status, actual_replica[status_attr])
@ddt.data(*fakes.fixture_reset_replica_status_with_different_roles)
@ddt.unpack

View File

@ -232,17 +232,10 @@ class ShareSnapshotInstancesApiTest(test.TestCase):
# validate response code and model status
self.assertEqual(valid_code, resp.status_int)
if valid_code == 404:
self.assertRaises(exception.ShareSnapshotInstanceNotFound,
(share_snapshot_instances.db.
share_snapshot_instance_get),
context,
instance['id'])
else:
actual_instance = (
share_snapshot_instances.db.share_snapshot_instance_get(
context, instance['id']))
self.assertEqual(valid_status, actual_instance['status'])
actual_instance = (
share_snapshot_instances.db.share_snapshot_instance_get(
context, instance['id']))
self.assertEqual(valid_status, actual_instance['status'])
@ddt.data(*fakes.fixture_reset_status_with_different_roles)
@ddt.unpack

View File

@ -626,14 +626,8 @@ class ShareSnapshotAdminActionsAPITest(test.TestCase):
# validate response code and model status
self.assertEqual(valid_code, resp.status_int)
if valid_code == 404:
self.assertRaises(exception.NotFound,
db_access_method,
ctxt,
model['id'])
else:
actual_model = db_access_method(ctxt, model['id'])
self.assertEqual(valid_status, actual_model['status'])
actual_model = db_access_method(ctxt, model['id'])
self.assertEqual(valid_status, actual_model['status'])
@ddt.data(*fakes.fixture_reset_status_with_different_roles)
@ddt.unpack