You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/10/02 18:42:11 UTC
[41/50] [abbrv] git commit: updated refs/heads/marvin-refactor to
bbaf354
marvin_refactor: CLOUDSTACK-4591 - switch to unittest2
Switch marvin to unittest2 so as to support multiple python versions
Signed-off-by: Prasanna Santhanam <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/83731835
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/83731835
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/83731835
Branch: refs/heads/marvin-refactor
Commit: 83731835753ec1d609883fbafa43797765a358c1
Parents: e3d9359
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Sep 30 11:39:58 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Oct 2 20:28:06 2013 +0530
----------------------------------------------------------------------
tools/marvin/marvin/TestCaseExecuteEngine.py | 2 +-
tools/marvin/marvin/cloudstackTestCase.py | 2 +-
tools/marvin/marvin/factory/data/vm.py | 13 ++-----------
tools/marvin/marvin/sandbox/testSetupSuccess.py | 2 --
tools/marvin/marvin/test/test_factories.py | 2 +-
tools/marvin/marvin/testSetupSuccess.py | 2 --
tools/marvin/setup.py | 1 +
7 files changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83731835/tools/marvin/marvin/TestCaseExecuteEngine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/TestCaseExecuteEngine.py b/tools/marvin/marvin/TestCaseExecuteEngine.py
index f5af1fe..6495000 100644
--- a/tools/marvin/marvin/TestCaseExecuteEngine.py
+++ b/tools/marvin/marvin/TestCaseExecuteEngine.py
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-import unittest
+import unittest2 as unittest
import os
import sys
import logging
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83731835/tools/marvin/marvin/cloudstackTestCase.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackTestCase.py b/tools/marvin/marvin/cloudstackTestCase.py
index 85ef542..b337944 100644
--- a/tools/marvin/marvin/cloudstackTestCase.py
+++ b/tools/marvin/marvin/cloudstackTestCase.py
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-import unittest
+import unittest2 as unittest
def user(Name, DomainName, AcctType):
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83731835/tools/marvin/marvin/factory/data/vm.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/factory/data/vm.py b/tools/marvin/marvin/factory/data/vm.py
index b9e6345..713c9b5 100644
--- a/tools/marvin/marvin/factory/data/vm.py
+++ b/tools/marvin/marvin/factory/data/vm.py
@@ -39,19 +39,10 @@ class VirtualMachineWithStaticNat(VirtualMachineFactory):
domainid=self.domainid,
zoneid=self.zoneid,
)
- ssh_fwrule = SshFirewallRule(
- apiclient=self.apiclient,
- ipaddressid=ipassoc.id
- )
- ntwks = Network.list(
- apiclient=self.apiclient,
- account=self.account,
- domainid=self.domainid,
- )
- ntwks[0].enableStaticNat(
+ ipassoc.enableStaticNat(
apiclient=self.apiclient,
ipaddressid=ipassoc.id,
- virtualmachineid=self.id,
+ virtualmachineid=self.id
)
self.ssh_ip = ipassoc.ipaddress
self.public_ip = ipassoc.ipaddress
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83731835/tools/marvin/marvin/sandbox/testSetupSuccess.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/testSetupSuccess.py b/tools/marvin/marvin/sandbox/testSetupSuccess.py
index 8a0034c..452f172 100644
--- a/tools/marvin/marvin/sandbox/testSetupSuccess.py
+++ b/tools/marvin/marvin/sandbox/testSetupSuccess.py
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-import marvin
-import unittest
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
from time import sleep as delay
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83731835/tools/marvin/marvin/test/test_factories.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/test/test_factories.py b/tools/marvin/marvin/test/test_factories.py
index b3ea0ac..75bf452 100644
--- a/tools/marvin/marvin/test/test_factories.py
+++ b/tools/marvin/marvin/test/test_factories.py
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-import unittest
+import unittest2 as unittest
import logging
from nose.plugins.attrib import attr
from should_dsl import should, should_not
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83731835/tools/marvin/marvin/testSetupSuccess.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/testSetupSuccess.py b/tools/marvin/marvin/testSetupSuccess.py
index 1701626..9652fa0 100644
--- a/tools/marvin/marvin/testSetupSuccess.py
+++ b/tools/marvin/marvin/testSetupSuccess.py
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-import marvin
-import unittest
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
from time import sleep as delay
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83731835/tools/marvin/setup.py
----------------------------------------------------------------------
diff --git a/tools/marvin/setup.py b/tools/marvin/setup.py
index 4a1cbc2..231a00a 100644
--- a/tools/marvin/setup.py
+++ b/tools/marvin/setup.py
@@ -49,6 +49,7 @@ setup(name="Marvin",
"marvin.test"],
license="LICENSE.txt",
install_requires=[
+ "unittest2",
"mysql-connector-python",
"requests",
"paramiko",