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>
diff --git a/tests/fixtures/layout.yaml b/tests/fixtures/layout.yaml
index 5e2049b..9c4b4d7 100644
--- a/tests/fixtures/layout.yaml
+++ b/tests/fixtures/layout.yaml
@@ -28,6 +28,13 @@
     start:
       verified: 0
 
+  - name: unused
+    manager: IndependentPipelineManager
+    trigger:
+      - event: comment-added
+        approval: 
+          - approved: 1
+
 jobs:
   - name: ^.*-merge$
     failure-message: Unable to merge change