libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [14/21] libcloud git commit: added an extra assertion to DRS tests
Date Wed, 19 Dec 2018 05:34:16 GMT
added an extra assertion to DRS tests


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/da71f405
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/da71f405
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/da71f405

Branch: refs/heads/trunk
Commit: da71f4055ddeffbb60b7187e93618d99c7c541ba
Parents: a14a2d9
Author: mitch <mitch.raful@itaas.dimensiondata.com>
Authored: Thu Dec 13 17:58:37 2018 -0500
Committer: mitch <mitch.raful@itaas.dimensiondata.com>
Committed: Thu Dec 13 17:58:37 2018 -0500

----------------------------------------------------------------------
 libcloud/test/compute/test_nttcis.py | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/da71f405/libcloud/test/compute/test_nttcis.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_nttcis.py b/libcloud/test/compute/test_nttcis.py
index 8fa8a53..35c7eac 100644
--- a/libcloud/test/compute/test_nttcis.py
+++ b/libcloud/test/compute/test_nttcis.py
@@ -8,6 +8,7 @@ from libcloud.common.nttcis import NttCisServerCpuSpecification, NttCisServerDis
 from libcloud.common.nttcis import NttCisTag, NttCisTagKey
 from libcloud.common.nttcis import NttCisServerCpuSpecification
 from libcloud.common.nttcis import NttCisServerDisk
+from libcloud.common.nttcis import ClassFactory
 from libcloud.common.nttcis import TYPES_URN
 from libcloud.compute.drivers.nttcis import NttCisNodeDriver as NttCis
 from libcloud.compute.drivers.nttcis import NttCisNic
@@ -1869,6 +1870,7 @@ def test_get_drs_snapshots(driver):
     cg_id = [i for i in cgs if i.name == "sdk_test2_cg"][0].id
     snaps = driver.list_consistency_group_snapshots(cg_id)
     assert hasattr(snaps, 'journalUsageGb')
+    assert isinstance(snaps, ClassFactory)
 
 
 def test_get_drs_snapshots_by_min_max(driver):
@@ -1882,16 +1884,6 @@ def test_get_drs_snapshots_by_min_max(driver):
         assert "2018-12" not in snap
 
 
-def test_get_drs_snapshots_by_min(driver):
-    cgs = driver.list_consistency_groups()
-    cg_id = [i for i in cgs if i.name == "sdk_test2_cg"][0].id
-    snaps = driver.list_consistency_group_snapshots(
-        cg_id,
-        create_time_min="2018-11-29T00:00:00.000-05:00")
-    for snap in snaps.snapshot:
-        assert (parse(snaps.snapshot[0].createTime) < parse(snap.createTime)) is False
-
-
 def test_expand_drs_journal(driver):
     cgs = driver.list_consistency_groups(name="sdk_test2_cg")
     cg_id = cgs[0].id
@@ -2019,6 +2011,10 @@ class NttCisMockHttp(MockHttp):
         body = self.fixtures.load('oec_0_9_myaccount.xml')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
+    def _oec_0_9_myaccount_DYNAMIC(self, method, url, body, headers):
+        body = self.fixtures.load('oec_0_9_myaccount.xml')
+        return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
     def _caas_2_7_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation(self, method,
url, body, headers):
         body = self.fixtures.load(
             'networkWithLocation.xml')


Mime
View raw message