~mordred/nova/volume-cleanup

« back to all changes in this revision

Viewing changes to nova/tests/test_xenapi.py

  • Committer: Tarmac
  • Author(s): Matthew Hooker
  • Date: 2011-07-29 19:48:58 UTC
  • mfrom: (1336.2.13 pylint-fixes)
  • Revision ID: tarmac-20110729194858-jpt7ggbes5v1z1fz
Fix various errors discovered by pylint and pyflakes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
877
877
                           network_info, resize_instance=False)
878
878
 
879
879
 
 
880
class XenAPIImageTypeTestCase(test.TestCase):
 
881
    """Test ImageType class."""
 
882
 
 
883
    def test_to_string(self):
 
884
        """Can convert from type id to type string."""
 
885
        self.assertEquals(
 
886
            vm_utils.ImageType.to_string(vm_utils.ImageType.KERNEL),
 
887
            vm_utils.ImageType.KERNEL_STR)
 
888
 
 
889
    def test_from_string(self):
 
890
        """Can convert from string to type id."""
 
891
        self.assertEquals(
 
892
            vm_utils.ImageType.from_string(vm_utils.ImageType.KERNEL_STR),
 
893
            vm_utils.ImageType.KERNEL)
 
894
 
 
895
 
880
896
class XenAPIDetermineDiskImageTestCase(test.TestCase):
881
897
    """Unit tests for code that detects the ImageType."""
882
898
    def setUp(self):