예제 #1
0
 def test_basic(self):
     sot = flavor.Flavor()
     self.assertEqual('flavor', sot.resource_key)
     self.assertEqual('flavors', sot.resources_key)
     self.assertEqual('/flavors', sot.base_path)
     self.assertTrue(sot.allow_list)
     self.assertFalse(sot.allow_create)
     self.assertTrue(sot.allow_fetch)
     self.assertFalse(sot.allow_commit)
     self.assertFalse(sot.allow_delete)
예제 #2
0
 def test_basic(self):
     sot = flavor.Flavor()
     self.assertEqual('flavor', sot.resource_key)
     self.assertEqual('flavors', sot.resources_key)
     self.assertEqual('/flavors', sot.base_path)
     self.assertEqual('database', sot.service.service_type)
     self.assertTrue(sot.allow_list)
     self.assertFalse(sot.allow_create)
     self.assertTrue(sot.allow_get)
     self.assertFalse(sot.allow_update)
     self.assertFalse(sot.allow_delete)
예제 #3
0
 def test_make_it(self):
     sot = flavor.Flavor(**EXAMPLE)
     self.assertEqual(IDENTIFIER, sot.id)
     self.assertEqual(EXAMPLE['links'], sot.links)
     self.assertEqual(EXAMPLE['name'], sot.name)
     self.assertEqual(EXAMPLE['ram'], sot.ram)
예제 #4
0
 def get_flavor(self, **data):
     return flavor.Flavor(data).get(self.session)