From 8136e84fde6098c33b83a76b07e7969396e14fec Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Thu, 4 Jun 2015 23:37:24 -0300 Subject: [PATCH] API review: sync with the avocado API changes While modules living under avocado.core are not intended to be used by tests, at this point extensions are OK using it. We may, in the (far?) future, come with an extension/plugin API definition but this is currently out of scope. So, for now, let's sync avocado-virt with the proposed changes on avocado itself. These are the changes that impact avocado-virt: * rename of avocado.test.Test to avocado.Test * rename of avocado.aexpect to avocado.core.aexpect * rename of avocado.data_dir to avocado.core.data_dir * rename of avocado.settings to avocado.core.settings Signed-off-by: Cleber Rosa --- avocado/core/plugins/virt_bootstrap.py | 2 +- avocado/virt/defaults.py | 6 +++--- avocado/virt/qemu/machine.py | 2 +- avocado/virt/test.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/avocado/core/plugins/virt_bootstrap.py b/avocado/core/plugins/virt_bootstrap.py index 81c120d..87405ba 100644 --- a/avocado/core/plugins/virt_bootstrap.py +++ b/avocado/core/plugins/virt_bootstrap.py @@ -15,7 +15,7 @@ import os import urllib2 -from avocado import data_dir +from avocado.core import data_dir from avocado.core import output from avocado.core.plugins import plugin from avocado.utils import download diff --git a/avocado/virt/defaults.py b/avocado/virt/defaults.py index fb792c8..42ce17d 100644 --- a/avocado/virt/defaults.py +++ b/avocado/virt/defaults.py @@ -16,9 +16,9 @@ Default values used in tests and plugin code. """ -from avocado import data_dir -from avocado.settings import settings -from avocado.settings import SettingsError +from avocado.core import data_dir +from avocado.core.settings import settings +from avocado.core.settings import SettingsError from avocado.virt.qemu import path try: diff --git a/avocado/virt/qemu/machine.py b/avocado/virt/qemu/machine.py index 3aee53e..75cc7f0 100644 --- a/avocado/virt/qemu/machine.py +++ b/avocado/virt/qemu/machine.py @@ -23,7 +23,7 @@ import copy from avocado.core import exceptions -from avocado import aexpect +from avocado.core import aexpect from avocado.utils import genio from avocado.utils import process from avocado.utils import remote diff --git a/avocado/virt/test.py b/avocado/virt/test.py index b7257cd..d6f11e5 100644 --- a/avocado/virt/test.py +++ b/avocado/virt/test.py @@ -14,13 +14,13 @@ # Author: Lucas Meneghel Rodrigues import os -from avocado import test +from avocado import Test from avocado.utils import process from avocado.virt import defaults from avocado.virt.qemu import machine -class VirtTest(test.Test): +class VirtTest(Test): def __init__(self, methodName='runTest', name=None, params=None, base_logdir=None, tag=None, job=None, runner_queue=None):