Fix bug with looking up a job tree.

If there are no jobs for a project in a pipeline, an exception
would be raised.  This change ensures that case is checked.

The test fixtures are updated to simulate this condition as well.

Change-Id: Id8e5bdef6288e5574d8553c11f5ac8e8c6c61704
Reviewed-on: https://review.openstack.org/10973
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>
2 files changed