~0x44/nova/bug838466

« back to all changes in this revision

Viewing changes to nova/tests/test_utils.py

  • Committer: Trey Morris
  • Date: 2011-06-30 19:20:59 UTC
  • mfrom: (1236 nova)
  • mto: This revision was merged to the branch mainline in revision 1237.
  • Revision ID: trey.morris@rackspace.com-20110630192059-pi1p516i50t8pc06
trunk merge with migration renumbering

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
        result = utils.parse_server_string('www.exa:mple.com:8443')
277
277
        self.assertEqual(('', ''), result)
278
278
 
 
279
    def test_bool_from_str(self):
 
280
        self.assertTrue(utils.bool_from_str('1'))
 
281
        self.assertTrue(utils.bool_from_str('2'))
 
282
        self.assertTrue(utils.bool_from_str('-1'))
 
283
        self.assertTrue(utils.bool_from_str('true'))
 
284
        self.assertTrue(utils.bool_from_str('True'))
 
285
        self.assertTrue(utils.bool_from_str('tRuE'))
 
286
        self.assertFalse(utils.bool_from_str('False'))
 
287
        self.assertFalse(utils.bool_from_str('false'))
 
288
        self.assertFalse(utils.bool_from_str('0'))
 
289
        self.assertFalse(utils.bool_from_str(None))
 
290
        self.assertFalse(utils.bool_from_str('junk'))
 
291
 
279
292
 
280
293
class IsUUIDLikeTestCase(test.TestCase):
281
294
    def assertUUIDLike(self, val, expected):