MCPcopy Create free account
hub / github.com/StackStorm/st2 / test_resource_query

Method test_resource_query

st2client/tests/unit/test_models.py:126–131  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124 ),
125 )
126 def test_resource_query(self):
127 mgr = models.ResourceManager(base.FakeResource, base.FAKE_ENDPOINT)
128 resources = mgr.query(name="abc")
129 actual = [resource.serialize() for resource in resources]
130 expected = json.loads(json.dumps([base.RESOURCES[0]]))
131 self.assertEqual(actual, expected)
132
133 @mock.patch.object(
134 httpclient.HTTPClient,

Callers

nothing calls this directly

Calls 2

queryMethod · 0.95
serializeMethod · 0.80

Tested by

no test coverage detected