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

Method test_count

st2common/tests/unit/test_persistence.py:60–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 self.assertIsNone(obj2)
59
60 def test_count(self):
61 obj1 = FakeModelDB(name=uuid.uuid4().hex, context={"user": "system"})
62 obj1 = self.access.add_or_update(obj1)
63 obj2 = FakeModelDB(name=uuid.uuid4().hex, context={"user": "stanley"})
64 obj2 = self.access.add_or_update(obj2)
65 self.assertEqual(self.access.count(), 2)
66
67 def test_get_all(self):
68 obj1 = FakeModelDB(name=uuid.uuid4().hex, context={"user": "system"})

Callers

nothing calls this directly

Calls 3

FakeModelDBClass · 0.90
add_or_updateMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected