Fix tests so they don't hang (see below)

A few tests would take a long time to run, and then eventually fail. The code being tested uses threads, and the test code instantiates threads as part of its testing. Sometimes when start() is called on a thread in test code, the next line in the test code is a mock assertion, and the assertion line is reached before the thread in the background causes the call being checked actually occurs. This has an unexpected behavior where Mock's assert_called_with method has already inspected the mock object's call trace before the thread has made the call.  This fails the test innacurately because of this asynchronous race condition even though the call actually does occur.  I'm not sure what mock provides for asynchronous testing, but you would have to synchronize when the thread has reached a certain state/point/etc.  This is a straightforward solution for now, and it's only on the cases that need it.