aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/unit/test_changes_manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/unit/test_changes_manager.py')
-rw-r--r--lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/unit/test_changes_manager.py58
1 files changed, 0 insertions, 58 deletions
diff --git a/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/unit/test_changes_manager.py b/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/unit/test_changes_manager.py
deleted file mode 100644
index 7eaec2ee..00000000
--- a/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/test/unit/test_changes_manager.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# This file is part of Buildbot. Buildbot is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation, version 2.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright Buildbot Team Members
-
-import mock
-from twisted.trial import unittest
-from twisted.application import service
-from buildbot.changes import manager
-
-class FakeChangeSource(service.Service):
- pass
-
-class TestChangeManager(unittest.TestCase):
- def setUp(self):
- self.master = mock.Mock()
- self.cm = manager.ChangeManager(self.master)
- self.new_config = mock.Mock()
-
- def make_sources(self, n):
- for i in range(n):
- src = FakeChangeSource()
- src.setName('ChangeSource %d' % i)
- yield src
-
- def test_reconfigService_add(self):
- src1, src2 = self.make_sources(2)
- src1.setServiceParent(self.cm)
- self.new_config.change_sources = [ src1, src2 ]
-
- d = self.cm.reconfigService(self.new_config)
- @d.addCallback
- def check(_):
- self.assertIdentical(src2.parent, self.cm)
- self.assertIdentical(src2.master, self.master)
- return d
-
- def test_reconfigService_remove(self):
- src1, = self.make_sources(1)
- src1.setServiceParent(self.cm)
- self.new_config.change_sources = [ ]
-
- d = self.cm.reconfigService(self.new_config)
- @d.addCallback
- def check(_):
- self.assertIdentical(src1.parent, None)
- self.assertIdentical(src1.master, None)
- return d