diff --git a/tests/base.py b/tests/base.py
index 9e3c07b..1b65416 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -45,8 +45,8 @@
 import testtools
 from git.exc import NoSuchPathError
 
-import zuul.connection.gerrit
-import zuul.connection.smtp
+import zuul.driver.gerrit.gerritsource as gerritsource
+import zuul.driver.gerrit.gerritconnection as gerritconnection
 import zuul.scheduler
 import zuul.webapp
 import zuul.rpclistener
@@ -58,12 +58,6 @@
 import zuul.merger.merger
 import zuul.merger.server
 import zuul.nodepool
-import zuul.reporter.gerrit
-import zuul.reporter.smtp
-import zuul.source.gerrit
-import zuul.trigger.gerrit
-import zuul.trigger.timer
-import zuul.trigger.zuultrigger
 import zuul.zk
 
 FIXTURE_DIR = os.path.join(os.path.dirname(__file__),
@@ -388,7 +382,7 @@
         self.reported += 1
 
 
-class FakeGerritConnection(zuul.connection.gerrit.GerritConnection):
+class FakeGerritConnection(gerritconnection.GerritConnection):
     """A Fake Gerrit connection for use in tests.
 
     This subclasses
@@ -398,9 +392,9 @@
 
     log = logging.getLogger("zuul.test.FakeGerritConnection")
 
-    def __init__(self, connection_name, connection_config,
+    def __init__(self, driver, connection_name, connection_config,
                  changes_db=None, upstream_root=None):
-        super(FakeGerritConnection, self).__init__(connection_name,
+        super(FakeGerritConnection, self).__init__(driver, connection_name,
                                                    connection_config)
 
         self.event_queue = Queue.Queue()
@@ -1225,14 +1219,15 @@
 
         self.config.set('gearman', 'port', str(self.gearman_server.port))
 
-        zuul.source.gerrit.GerritSource.replication_timeout = 1.5
-        zuul.source.gerrit.GerritSource.replication_retry_interval = 0.5
-        zuul.connection.gerrit.GerritEventConnector.delay = 0.0
+        gerritsource.GerritSource.replication_timeout = 1.5
+        gerritsource.GerritSource.replication_retry_interval = 0.5
+        gerritconnection.GerritEventConnector.delay = 0.0
 
         self.sched = zuul.scheduler.Scheduler(self.config)
 
         self.useFixture(fixtures.MonkeyPatch('swiftclient.client.Connection',
                                              FakeSwiftClientConnection))
+
         self.swift = zuul.lib.swift.Swift(self.config)
 
         self.event_queues = [
@@ -1294,7 +1289,25 @@
         self.assertFinalState()
 
     def configure_connections(self):
-        # Register connections from the config
+        # Set up gerrit related fakes
+        # Set a changes database so multiple FakeGerrit's can report back to
+        # a virtual canonical database given by the configured hostname
+        self.gerrit_changes_dbs = {}
+
+        def getGerritConnection(driver, name, config):
+            db = self.gerrit_changes_dbs.setdefault(config['server'], {})
+            con = FakeGerritConnection(driver, name, config,
+                                       changes_db=db,
+                                       upstream_root=self.upstream_root)
+            self.event_queues.append(con.event_queue)
+            setattr(self, 'fake_' + name, con)
+            return con
+
+        self.useFixture(fixtures.MonkeyPatch(
+            'zuul.driver.gerrit.GerritDriver.getConnection',
+            getGerritConnection))
+
+        # Set up smtp related fakes
         self.smtp_messages = []
 
         def FakeSMTPFactory(*args, **kw):
@@ -1303,60 +1316,9 @@
 
         self.useFixture(fixtures.MonkeyPatch('smtplib.SMTP', FakeSMTPFactory))
 
-        # Set a changes database so multiple FakeGerrit's can report back to
-        # a virtual canonical database given by the configured hostname
-        self.gerrit_changes_dbs = {}
+        # Register connections from the config using fakes
         self.connections = zuul.lib.connections.ConnectionRegistry()
-
-        for section_name in self.config.sections():
-            con_match = re.match(r'^connection ([\'\"]?)(.*)(\1)$',
-                                 section_name, re.I)
-            if not con_match:
-                continue
-            con_name = con_match.group(2)
-            con_config = dict(self.config.items(section_name))
-
-            if 'driver' not in con_config:
-                raise Exception("No driver specified for connection %s."
-                                % con_name)
-
-            con_driver = con_config['driver']
-
-            # TODO(jhesketh): load the required class automatically
-            if con_driver == 'gerrit':
-                if con_config['server'] not in self.gerrit_changes_dbs.keys():
-                    self.gerrit_changes_dbs[con_config['server']] = {}
-                self.connections.connections[con_name] = FakeGerritConnection(
-                    con_name, con_config,
-                    changes_db=self.gerrit_changes_dbs[con_config['server']],
-                    upstream_root=self.upstream_root
-                )
-                self.event_queues.append(
-                    self.connections.connections[con_name].event_queue)
-                setattr(self, 'fake_' + con_name,
-                        self.connections.connections[con_name])
-            elif con_driver == 'smtp':
-                self.connections.connections[con_name] = \
-                    zuul.connection.smtp.SMTPConnection(con_name, con_config)
-            else:
-                raise Exception("Unknown driver, %s, for connection %s"
-                                % (con_config['driver'], con_name))
-
-        # If the [gerrit] or [smtp] sections still exist, load them in as a
-        # connection named 'gerrit' or 'smtp' respectfully
-
-        if 'gerrit' in self.config.sections():
-            self.gerrit_changes_dbs['gerrit'] = {}
-            self.event_queues.append(
-                self.connections.connections[con_name].event_queue)
-            self.connections.connections['gerrit'] = FakeGerritConnection(
-                '_legacy_gerrit', dict(self.config.items('gerrit')),
-                changes_db=self.gerrit_changes_dbs['gerrit'])
-
-        if 'smtp' in self.config.sections():
-            self.connections.connections['smtp'] = \
-                zuul.connection.smtp.SMTPConnection(
-                    '_legacy_smtp', dict(self.config.items('smtp')))
+        self.connections.configure(self.config)
 
     def setup_config(self):
         # This creates the per-test configuration object.  It can be
diff --git a/tests/test_connection.py b/tests/test_connection.py
index b3c133c..f8d1bf5 100644
--- a/tests/test_connection.py
+++ b/tests/test_connection.py
@@ -12,22 +12,9 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-import logging
-import testtools
-
-import zuul.connection.gerrit
-
 from tests.base import ZuulTestCase
 
 
-class TestGerritConnection(testtools.TestCase):
-    log = logging.getLogger("zuul.test_connection")
-
-    def test_driver_name(self):
-        self.assertEqual('gerrit',
-                         zuul.connection.gerrit.GerritConnection.driver_name)
-
-
 class TestConnections(ZuulTestCase):
     config_file = 'zuul-connections-same-gerrit.conf'
     tenant_config_file = 'config/zuul-connections-same-gerrit/main.yaml'
diff --git a/tests/test_gerrit.py b/tests/test_gerrit.py
index 93ce122..bfbaedc 100644
--- a/tests/test_gerrit.py
+++ b/tests/test_gerrit.py
@@ -21,7 +21,7 @@
     import mock
 
 from tests.base import BaseTestCase
-from zuul.connection.gerrit import GerritConnection
+from zuul.driver.gerrit.gerritconnection import GerritConnection
 
 FIXTURE_DIR = os.path.join(os.path.dirname(__file__), 'fixtures/gerrit')
 
@@ -46,13 +46,13 @@
 
 class TestGerrit(BaseTestCase):
 
-    @mock.patch('zuul.connection.gerrit.GerritConnection._ssh')
+    @mock.patch('zuul.driver.gerrit.gerritconnection.GerritConnection._ssh')
     def run_query(self, files, expected_patches, _ssh_mock):
         gerrit_config = {
             'user': 'gerrit',
             'server': 'localhost',
         }
-        gerrit = GerritConnection('review_gerrit', gerrit_config)
+        gerrit = GerritConnection(None, 'review_gerrit', gerrit_config)
 
         calls, values = read_fixtures(files)
         _ssh_mock.side_effect = values
diff --git a/tests/test_reporter.py b/tests/test_reporter.py
deleted file mode 100644
index 8d3090a..0000000
--- a/tests/test_reporter.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2014 Rackspace Australia
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import logging
-import testtools
-
-import zuul.reporter
-
-
-class TestSMTPReporter(testtools.TestCase):
-    log = logging.getLogger("zuul.test_reporter")
-
-    def setUp(self):
-        super(TestSMTPReporter, self).setUp()
-
-    def test_reporter_abc(self):
-        # We only need to instantiate a class for this
-        reporter = zuul.reporter.smtp.SMTPReporter({})  # noqa
-
-    def test_reporter_name(self):
-        self.assertEqual('smtp', zuul.reporter.smtp.SMTPReporter.name)
-
-
-class TestGerritReporter(testtools.TestCase):
-    log = logging.getLogger("zuul.test_reporter")
-
-    def setUp(self):
-        super(TestGerritReporter, self).setUp()
-
-    def test_reporter_abc(self):
-        # We only need to instantiate a class for this
-        reporter = zuul.reporter.gerrit.GerritReporter(None)  # noqa
-
-    def test_reporter_name(self):
-        self.assertEqual('gerrit', zuul.reporter.gerrit.GerritReporter.name)
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 579f7a3..821629c 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -29,8 +29,6 @@
 import zuul.change_matcher
 import zuul.scheduler
 import zuul.rpcclient
-import zuul.reporter.gerrit
-import zuul.reporter.smtp
 import zuul.model
 
 from tests.base import (
diff --git a/tests/test_source.py b/tests/test_source.py
deleted file mode 100644
index 8a3e7d5..0000000
--- a/tests/test_source.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2014 Rackspace Australia
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import logging
-import testtools
-
-import zuul.source
-
-
-class TestGerritSource(testtools.TestCase):
-    log = logging.getLogger("zuul.test_source")
-
-    def test_source_name(self):
-        self.assertEqual('gerrit', zuul.source.gerrit.GerritSource.name)
diff --git a/tests/test_trigger.py b/tests/test_trigger.py
deleted file mode 100644
index 7eb1b69..0000000
--- a/tests/test_trigger.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 2014 Rackspace Australia
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import logging
-import testtools
-
-import zuul.trigger
-
-
-class TestGerritTrigger(testtools.TestCase):
-    log = logging.getLogger("zuul.test_trigger")
-
-    def test_trigger_abc(self):
-        # We only need to instantiate a class for this
-        zuul.trigger.gerrit.GerritTrigger({})
-
-    def test_trigger_name(self):
-        self.assertEqual('gerrit', zuul.trigger.gerrit.GerritTrigger.name)
-
-
-class TestTimerTrigger(testtools.TestCase):
-    log = logging.getLogger("zuul.test_trigger")
-
-    def test_trigger_abc(self):
-        # We only need to instantiate a class for this
-        zuul.trigger.timer.TimerTrigger({})
-
-    def test_trigger_name(self):
-        self.assertEqual('timer', zuul.trigger.timer.TimerTrigger.name)
-
-
-class TestZuulTrigger(testtools.TestCase):
-    log = logging.getLogger("zuul.test_trigger")
-
-    def test_trigger_abc(self):
-        # We only need to instantiate a class for this
-        zuul.trigger.zuultrigger.ZuulTrigger({})
-
-    def test_trigger_name(self):
-        self.assertEqual('zuul', zuul.trigger.zuultrigger.ZuulTrigger.name)
