Github user gauravaradhye commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/632#discussion_r35739964
  
    --- Diff: test/integration/smoke/test_snapshots.py ---
    @@ -123,65 +126,78 @@ def test_01_snapshot_root_disk(self):
             #    the reqd volume under
             #    /secondary/snapshots//$account_id/$volumeid/$snapshot_uuid
             # 3. verify backup_snap_id was non null in the `snapshots` table
    +        # 4. Verify that zoneid is returned in listSnapshots API response
     
             volumes = list_volumes(
    -                            self.apiclient,
    -                            
virtualmachineid=self.virtual_machine_with_disk.id,
    -                            type='ROOT',
    -                            listall=True
    -                            )
    +            self.apiclient,
    +            virtualmachineid=self.virtual_machine_with_disk.id,
    +            type='ROOT',
    +            listall=True
    +        )
     
             snapshot = Snapshot.create(
    -                                   self.apiclient,
    -                                   volumes[0].id,
    -                                   account=self.account.name,
    -                                   domainid=self.account.domainid
    -                                   )
    +            self.apiclient,
    +            volumes[0].id,
    +            account=self.account.name,
    +            domainid=self.account.domainid
    +        )
             self.debug("Snapshot created: ID - %s" % snapshot.id)
     
             snapshots = list_snapshots(
    -                                  self.apiclient,
    -                                  id=snapshot.id
    -                                  )
    +            self.apiclient,
    +            id=snapshot.id
    +        )
             self.assertEqual(
    -                            isinstance(snapshots, list),
    -                            True,
    -                            "Check list response returns a valid list"
    -                        )
    +            isinstance(snapshots, list),
    +            True,
    +            "Check list response returns a valid list"
    +        )
     
             self.assertNotEqual(
    -                            snapshots,
    -                            None,
    -                            "Check if result exists in list item call"
    -                            )
    +            snapshots,
    +            None,
    +            "Check if result exists in list item call"
    +        )
             self.assertEqual(
    -                            snapshots[0].id,
    -                            snapshot.id,
    -                            "Check resource id in list resources call"
    -                        )
    +            snapshots[0].id,
    +            snapshot.id,
    +            "Check resource id in list resources call"
    +        )
    +        self.assertNotEqual(
    --- End diff --
    
    You can directly use assertIsNotNone here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to