Re-enable test_layered_templates test

Change-Id: Ica7deccdc1d6183ba5e781df020f7e77294e6e25
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/tests/fixtures/config/templated-project/git/common-config/zuul.yaml b/tests/fixtures/config/templated-project/git/common-config/zuul.yaml
index ee0a3e4..b4773f1 100644
--- a/tests/fixtures/config/templated-project/git/common-config/zuul.yaml
+++ b/tests/fixtures/config/templated-project/git/common-config/zuul.yaml
@@ -53,13 +53,45 @@
         - project-test1
         - project-test2
 
+- project-template:
+    name: test-three-and-four
+    check:
+       jobs:
+         - layered-project-test3
+         - layered-project-test4
+
+- project-template:
+    name: test-five
+    check:
+      jobs:
+         - layered-project-foo-test5
+
 - job:
     name: project-test1
 
 - job:
     name: project-test2
 
+- job:
+    name: layered-project-test3
+
+- job:
+    name: layered-project-test4
+
+- job:
+    name: layered-project-foo-test5
+
 - project:
     name: org/templated-project
     templates:
       - test-one-and-two
+
+- project:
+    name: org/layered-project
+    templates:
+      - test-one-and-two
+      - test-three-and-four
+      - test-five
+    check:
+      jobs:
+        - project-test6
diff --git a/tests/fixtures/config/templated-project/git/org_layered-project/README b/tests/fixtures/config/templated-project/git/org_layered-project/README
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/tests/fixtures/config/templated-project/git/org_layered-project/README
@@ -0,0 +1 @@
+test
diff --git a/tests/fixtures/layout.yaml b/tests/fixtures/layout.yaml
index dfe8ded..eb8f17c 100644
--- a/tests/fixtures/layout.yaml
+++ b/tests/fixtures/layout.yaml
@@ -142,19 +142,6 @@
       - project1
       - extratag
 
-project-templates:
-  - name: test-one-and-two
-    check:
-     - '{projectname}-test1'
-     - '{projectname}-test2'
-  - name: test-three-and-four
-    check:
-     - '{name}-test3'
-     - '{name}-test4'
-  - name: test-five
-    check:
-     - '{name}-{something}-test5'
-
 projects:
   - name: org/project
     merge-mode: cherry-pick
@@ -229,16 +216,6 @@
     post:
       - nonvoting-project-post
 
-  - name: org/layered-project
-    template:
-      - name: test-one-and-two
-        projectname: project
-      - name: test-three-and-four
-      - name: test-five
-        something: foo
-    check:
-      - project-test6
-
   - name: org/node-project
     gate:
       - node-project-merge:
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index f91401c..5e19d7d 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -1226,28 +1226,6 @@
         self.assertNotEqual(ref_A, ref_B, ref_C)
         self.assertNotEqual(commit_A, commit_B, commit_C)
 
-    @skip("Disabled for early v3 development")
-    def test_layered_templates(self):
-        "Test whether a job generated via a template can be launched"
-
-        A = self.fake_gerrit.addFakeChange(
-            'org/layered-project', 'master', 'A')
-        self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(1))
-        self.waitUntilSettled()
-
-        self.assertEqual(self.getJobFromHistory('project-test1').result,
-                         'SUCCESS')
-        self.assertEqual(self.getJobFromHistory('project-test2').result,
-                         'SUCCESS')
-        self.assertEqual(self.getJobFromHistory('layered-project-test3'
-                                                ).result, 'SUCCESS')
-        self.assertEqual(self.getJobFromHistory('layered-project-test4'
-                                                ).result, 'SUCCESS')
-        self.assertEqual(self.getJobFromHistory('layered-project-foo-test5'
-                                                ).result, 'SUCCESS')
-        self.assertEqual(self.getJobFromHistory('project-test6').result,
-                         'SUCCESS')
-
     def test_dependent_changes_dequeue(self):
         "Test that dependent patches are not needlessly tested"
 
@@ -4682,3 +4660,24 @@
                          'SUCCESS')
         self.assertEqual(self.getJobFromHistory('project-test2').result,
                          'SUCCESS')
+
+    def test_layered_templates(self):
+        "Test whether a job generated via a template can be launched"
+
+        A = self.fake_gerrit.addFakeChange(
+            'org/layered-project', 'master', 'A')
+        self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(1))
+        self.waitUntilSettled()
+
+        self.assertEqual(self.getJobFromHistory('project-test1').result,
+                         'SUCCESS')
+        self.assertEqual(self.getJobFromHistory('project-test2').result,
+                         'SUCCESS')
+        self.assertEqual(self.getJobFromHistory('layered-project-test3'
+                                                ).result, 'SUCCESS')
+        self.assertEqual(self.getJobFromHistory('layered-project-test4'
+                                                ).result, 'SUCCESS')
+        self.assertEqual(self.getJobFromHistory('layered-project-foo-test5'
+                                                ).result, 'SUCCESS')
+        self.assertEqual(self.getJobFromHistory('project-test6').result,
+                         'SUCCESS')