This mocks some calls the ThreadGroup when testing update and delete of
the stack, resulting in tracebacks when the threads randomly run later
on in the test suite.
Change-Id: Ia1a376933c2e25b6cf0fe6a26f47e381cbb1a55e
Fixes: bug #1182285
parser.Stack.load(self.ctx, stack=s).AndReturn(stack)
+ self.man.tg = DummyThreadGroup()
+
self.m.ReplayAll()
self.assertEqual(self.man.delete_stack(self.ctx, stack.identifier()),
self.m.StubOutWithMock(stack, 'validate')
stack.validate().AndReturn(None)
+ self.m.StubOutWithMock(threadgroup, 'ThreadGroup')
+ threadgroup.ThreadGroup().AndReturn(DummyThreadGroup())
+
self.m.ReplayAll()
result = self.man.update_stack(self.ctx, old_stack.identifier(),