Browse files

Move FakeRenderable to buildbot.test.util.properties

  • Loading branch information...
1 parent dd4db71 commit 06865f45820970e5e88dd90e77bfd52b655d8489 @sa1 committed Apr 12, 2012
Showing with 25 additions and 7 deletions.
  1. +1 −7 master/buildbot/test/unit/test_process_properties.py
  2. +24 −0 master/buildbot/test/util/properties.py
View
8 master/buildbot/test/unit/test_process_properties.py
@@ -23,6 +23,7 @@
from buildbot.process.properties import Property, PropertiesMixin
from buildbot.interfaces import IRenderable, IProperties
from buildbot.test.util.config import ConfigErrorsMixin
+from buildbot.test.util.properties import FakeRenderable
class FakeSource:
def __init__(self):
@@ -52,13 +53,6 @@ def getSourceStamp(self, codebase):
return self.sources[codebase]
return None
-class FakeRenderable(object):
- implements(IRenderable)
- def __init__(self, value):
- self.value = value
- def getRenderingFor(self, props):
- return self.value
-
class DeferredRenderable:
implements (IRenderable)
def __init__(self):
View
24 master/buildbot/test/util/properties.py
@@ -0,0 +1,24 @@
+# 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
+
+from zope.interface import implements
+from buildbot.interfaces import IRenderable
+
+class FakeRenderable(object):
+ implements(IRenderable)
+ def __init__(self, value):
+ self.value = value
+ def getRenderingFor(self, props):
+ return self.value

0 comments on commit 06865f4

Please sign in to comment.