Merge "Addresses pep8/pyflakes issues with compute admin tests"

This commit is contained in:
Jenkins 2013-07-12 18:01:31 +00:00 committed by Gerrit Code Review
commit dbdd275c00
10 changed files with 12 additions and 15 deletions

View File

@ -13,4 +13,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

View File

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from cafe.drivers.unittest.decorators import tags
from cloudcafe.compute.common.types import BackupTypes
from test_repo.compute.fixtures import ComputeAdminFixture

View File

@ -54,4 +54,3 @@ class LockServerTests(ComputeAdminFixture):
def test_cannot_resize_locked_server(self):
with self.assertRaises(ActionInProgress):
self.servers_client.resize(self.server.id, self.flavor_ref)

View File

@ -17,6 +17,7 @@ limitations under the License.
from cloudcafe.compute.common.types import NovaServerStatusTypes
from test_repo.compute.fixtures import ComputeAdminFixture
class MigrateServerTests(ComputeAdminFixture):
@classmethod

View File

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from cafe.drivers.unittest.decorators import tags
from test_repo.compute.fixtures import ComputeAdminFixture
@ -28,6 +27,8 @@ class PauseServerTests(ComputeAdminFixture):
def test_pause_unpause_server(self):
self.admin_servers_client.pause_server(self.server.id)
self.admin_server_behaviors.wait_for_server_status(self.server.id, 'PAUSED')
self.admin_server_behaviors.wait_for_server_status(
self.server.id, 'PAUSED')
self.admin_servers_client.unpause_server(self.server.id)
self.admin_server_behaviors.wait_for_server_status(self.server.id, 'ACTIVE')
self.admin_server_behaviors.wait_for_server_status(
self.server.id, 'ACTIVE')

View File

@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from cafe.drivers.unittest.decorators import tags
from test_repo.compute.fixtures import ComputeAdminFixture
class ResetServerStateTests(ComputeAdminFixture):
@classmethod
@ -29,10 +29,12 @@ class ResetServerStateTests(ComputeAdminFixture):
# Set the active server into error status
self.admin_servers_client.reset_state(self.server.id, 'error')
current_server = self.admin_servers_client.get_server(self.server.id).entity
current_server = self.admin_servers_client.get_server(
self.server.id).entity
self.assertEqual(current_server.status.lower(), 'error')
# Reset the server's error status back to active
self.admin_servers_client.reset_state(self.server.id, 'active')
current_server = self.admin_servers_client.get_server(self.server.id).entity
current_server = self.admin_servers_client.get_server(
self.server.id).entity
self.assertEqual(current_server.status.lower(), 'active')

View File

@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from cafe.drivers.unittest.decorators import tags
from test_repo.compute.fixtures import ComputeAdminFixture
class StopServerTests(ComputeAdminFixture):
@classmethod

View File

@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from cafe.drivers.unittest.decorators import tags
from test_repo.compute.fixtures import ComputeAdminFixture
class SuspendServerTests(ComputeAdminFixture):
@classmethod

View File

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from random import randint
from cafe.drivers.unittest.decorators import tags
from cloudcafe.common.tools.datagen import rand_name
from cloudcafe.compute.common.exceptions import ActionInProgress

View File

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
from random import randint
from cafe.drivers.unittest.decorators import tags
from cloudcafe.common.tools.datagen import rand_name
from cloudcafe.compute.common.exceptions import BadRequest, ItemNotFound