full coverage from nosetests

This commit is contained in:
Thomas Maddox
2013-06-13 16:07:54 -05:00
parent d95fd8c896
commit 02484fb5ec

View File

@@ -78,13 +78,13 @@ class ImageTypeTestCase(unittest.TestCase):
"image_meta": { "image_meta": {
"image_type": "base", "image_type": "base",
"os_type": "linux", "os_type": "linux",
"os_distro": "ubuntu" "os_distro": "centos"
} }
} }
result = image_type.get_numeric_code(payload, 0) result = image_type.get_numeric_code(payload, 0)
self.assertEqual(result, 0x111) self.assertEqual(result, 0x411)
def test_readable(self): def test_readable(self):
value = 0x111 value = 0x111
@@ -141,3 +141,5 @@ class ImageTypeTestCase(unittest.TestCase):
self.assertFalse(image_type.isset(value, image_type.OS_CENTOS)) self.assertFalse(image_type.isset(value, image_type.OS_CENTOS))
def test_blank_argument_isset(self):
self.assertFalse(image_type.isset(None, image_type.OS_CENTOS))