diff --git a/senlin/tests/engine/test_profiles.py b/senlin/tests/engine/test_profiles.py index b8989ec2c..033853c3a 100644 --- a/senlin/tests/engine/test_profiles.py +++ b/senlin/tests/engine/test_profiles.py @@ -204,10 +204,6 @@ class ProfileTest(base.SenlinTestCase): self.assertEqual(1, len(result)) self.assertEqual(p1['id'], result[0]['id']) - # non boolean will be ignored - result = self.eng.profile_list(self.ctx, show_deleted='abc') - self.assertEqual(1, len(result)) - def test_profile_list_with_filters(self): self.eng.profile_create(self.ctx, 'p-B', 'TestProfile', {}, perm='1111') @@ -227,6 +223,16 @@ class ProfileTest(base.SenlinTestCase): result = self.eng.profile_list(self.ctx, filters=filters) self.assertEqual(2, len(result)) + def test_profile_list_bad_param(self): + ex = self.assertRaises(rpc.ExpectedException, + self.eng.profile_list, self.ctx, limit='no') + self.assertEqual(exception.InvalidParameter, ex.exc_info[0]) + + ex = self.assertRaises(rpc.ExpectedException, + self.eng.profile_list, self.ctx, + show_deleted='no') + self.assertEqual(exception.InvalidParameter, ex.exc_info[0]) + def test_profile_list_empty(self): result = self.eng.profile_list(self.ctx) self.assertIsInstance(result, list)