summaryrefslogtreecommitdiff
path: root/heat/tests/test_resource.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-05 09:50:38 +0000
committerGerrit Code Review <review@openstack.org>2017-06-05 09:50:38 +0000
commit3af92c84a7548ea92440b3ced8ec0e4f0109794c (patch)
tree30a614dfe8595868b3748ef95735529e2cbc4b98 /heat/tests/test_resource.py
parent88f19ce1568d8977af7e802e919805d7b2b3af55 (diff)
parent93fab308e8057ab95ca0e98a6515f2cf9648ed3e (diff)
downloadheat-3af92c84a7548ea92440b3ced8ec0e4f0109794c.tar.gz
Merge "Load "lighter" db resources when appropriate"
Diffstat (limited to 'heat/tests/test_resource.py')
-rw-r--r--heat/tests/test_resource.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/heat/tests/test_resource.py b/heat/tests/test_resource.py
index 501215a36..2e6047e5d 100644
--- a/heat/tests/test_resource.py
+++ b/heat/tests/test_resource.py
@@ -596,6 +596,16 @@ class ResourceTest(common.HeatTestCase):
res.store()
self.assertIsNotNone(res.updated_time)
+ def test_resource_object_get_obj_fields(self):
+ snippet = rsrc_defn.ResourceDefinition('aresource',
+ 'GenericResourceType')
+ res = resource.Resource('aresource', snippet, self.stack)
+ res.store()
+ res_obj = resource_objects.Resource.get_obj(
+ res.context, res.id, refresh=False, fields=('status', ))
+ self.assertEqual(res_obj.status, res.COMPLETE)
+ self.assertRaises(AttributeError, getattr, res_obj, 'action')
+
def test_resource_object_resource_properties_data(self):
cfg.CONF.set_override('encrypt_parameters_and_properties', True)
data = {'p1': 'i see',