~cbehrens/nova/search-api

« back to all changes in this revision

Viewing changes to nova/tests/test_utils.py

compute_api.get_all should be able to recurse zones (bug 744217).
Also, allow to build more than one instance at once with zone_aware_scheduler types.
Other cleanups with regards to zone aware scheduler...
 

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):