Example #1
0
 def test_make_it(self):
     sot = quota.Quota(**EXAMPLE)
     self.assertEqual(EXAMPLE['load_balancer'], sot.load_balancers)
     self.assertEqual(EXAMPLE['listener'], sot.listeners)
     self.assertEqual(EXAMPLE['pool'], sot.pools)
     self.assertEqual(EXAMPLE['health_monitor'], sot.health_monitors)
     self.assertEqual(EXAMPLE['member'], sot.members)
     self.assertEqual(EXAMPLE['project_id'], sot.project_id)
Example #2
0
 def test_basic(self):
     sot = quota.Quota()
     self.assertEqual('quota', sot.resource_key)
     self.assertEqual('quotas', sot.resources_key)
     self.assertEqual('/lbaas/quotas', sot.base_path)
     self.assertFalse(sot.allow_create)
     self.assertTrue(sot.allow_fetch)
     self.assertTrue(sot.allow_commit)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Example #3
0
 def test_prepare_request(self):
     body = {'id': 'ABCDEFGH', 'load_balancer': '12345'}
     quota_obj = quota.Quota(**body)
     response = quota_obj._prepare_request()
     self.assertNotIn('id', response)