added an extra assertion to DRS tests
authormitch <mitch.raful@itaas.dimensiondata.com>
Thu, 13 Dec 2018 22:58:37 +0000 (17:58 -0500)
committermitch <mitch.raful@itaas.dimensiondata.com>
Thu, 13 Dec 2018 22:58:37 +0000 (17:58 -0500)
libcloud/test/compute/test_nttcis.py

index 8fa8a53..35c7eac 100644 (file)
@@ -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')