diff --git a/tools/marvin/marvin/factory/AccountFactory.py b/tools/marvin/marvin/factory/AccountFactory.py index 5b973325eed..3c076833788 100644 --- a/tools/marvin/marvin/factory/AccountFactory.py +++ b/tools/marvin/marvin/factory/AccountFactory.py @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. -import hashlib -from marvin.factory.CloudStackBaseFactory import * +import factory +from marvin.factory.CloudStackBaseFactory import CloudStackBaseFactory from marvin.base import Account from marvin.utils import random_gen @@ -30,11 +30,7 @@ class AccountFactory(CloudStackBaseFactory): lastname = factory.Sequence(lambda n: random_gen()) email = factory.LazyAttribute(lambda e: '{0}.{1}@cloudstack.org'.format(e.firstname, e.lastname).lower()) username = factory.Sequence(lambda n: random_gen()) - - # Password Encoding - mdf = hashlib.md5() - mdf.update('password') - password = mdf.hexdigest() + password = 'password' class AdminAccountFactory(AccountFactory): diff --git a/tools/marvin/marvin/factory/TemplateFactory.py b/tools/marvin/marvin/factory/TemplateFactory.py index 85c383fcda1..6d71277920a 100644 --- a/tools/marvin/marvin/factory/TemplateFactory.py +++ b/tools/marvin/marvin/factory/TemplateFactory.py @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. from marvin.base import Template -from marvin.factory import CloudStackBaseFactory +from marvin.factory.CloudStackBaseFactory import CloudStackBaseFactory class TemplateFactory(CloudStackBaseFactory): diff --git a/tools/marvin/marvin/factory/VirtualMachineFactory.py b/tools/marvin/marvin/factory/VirtualMachineFactory.py index 4d8a4d69268..6c6e44ed1cd 100644 --- a/tools/marvin/marvin/factory/VirtualMachineFactory.py +++ b/tools/marvin/marvin/factory/VirtualMachineFactory.py @@ -15,12 +15,12 @@ # specific language governing permissions and limitations # under the License. -from marvin.base import VirtualMachine -from marvin.factory import CloudStackBaseFactory +from marvin.base.VirtualMachine import VirtualMachine +from marvin.factory.CloudStackBaseFactory import CloudStackBaseFactory class VirtualMachineFactory(CloudStackBaseFactory): - FACTORY_FOR = VirtualMachine.VirtualMachine + FACTORY_FOR = VirtualMachine serviceofferingid = None templateid = None diff --git a/tools/marvin/marvin/factory/ZoneFactory.py b/tools/marvin/marvin/factory/ZoneFactory.py index c3f1dcac1ce..bc32e16f80a 100644 --- a/tools/marvin/marvin/factory/ZoneFactory.py +++ b/tools/marvin/marvin/factory/ZoneFactory.py @@ -21,7 +21,7 @@ from marvin.utils import random_gen class ZoneFactory(CloudStackBaseFactory): - FACTORY_FOR = Zone + FACTORY_FOR = Zone.Zone dns1 = "8.8.8.8" internaldns1 = "8.8.8.8" diff --git a/tools/marvin/marvin/factory/test/testFactories.py b/tools/marvin/marvin/factory/test/testFactories.py index 89f9b262eda..c054bbcbd51 100644 --- a/tools/marvin/marvin/factory/test/testFactories.py +++ b/tools/marvin/marvin/factory/test/testFactories.py @@ -17,22 +17,24 @@ import unittest import logging + from marvin.cloudstackTestClient import cloudstackTestClient -from marvin.base import Account, Zone, Template, User from marvin.factory.AccountFactory import * - from marvin.factory.ServiceOfferingFactory import * - from marvin.factory.NetworkOfferingFactory import * - from marvin.factory.TemplateFactory import * - from marvin.factory.VirtualMachineFactory import * - from marvin.factory.UserFactory import * +from marvin.base.Zone import * +from marvin.base.Account import Account +from marvin.base.Template import Template + + + + class BuildVsCreateStrategyTest(unittest.TestCase): def setUp(self): self.apiClient = cloudstackTestClient(mgtSvr='localhost', logging=logging.getLogger('factories.cloudstack')).getApiClient()