[Checkins] SVN: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/ Skeleton test infrastructure.
Charlie Clark
charlie at begeistert.org
Tue Dec 6 16:54:12 UTC 2011
Log message for revision 123597:
Skeleton test infrastructure.
Changed:
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/__init__.py
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/test_activity.py
-=-
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/__init__.py
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/test_activity.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/test_activity.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/test_activity.py 2011-12-06 16:54:12 UTC (rev 123597)
@@ -0,0 +1,69 @@
+##############################################################################
+#
+# Copyright (c) 2011 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+import unittest
+
+
+class DummyDatabaseConnection:
+
+ def __init__(self):
+ self.am = DummyActivityMonitor()
+
+ def db(self):
+ return self
+
+ def getActivityMonitor(self):
+ pass
+
+
+class DummyDatabaseObject:
+
+ def __init__(self):
+ self._p_jar = DummyDatabaseConnection()
+
+
+class DummyActivityMonitor:
+
+ def getHistoryLength(self):
+ pass
+
+ def getActivityAnalysis(start=None, end=None, divisions=None):
+ pass
+
+
+class Tests(unittest.TestCase):
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def _getTargetClass(self):
+ from zmi.core.browser.database.activity import View
+ return View
+
+ def _makeOne(self):
+ root = DummyDatabaseObject()
+ view = self._getTargetClass()
+ return view(root, {})
+
+ def test_db(self):
+ view = self._makeOne()
+ return True
+
+
+def test_suite():
+ return unittest.TestSuite((
+ unittest.makeSuite(Tests),
+ ))
\ No newline at end of file
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/database/tests/test_activity.py
___________________________________________________________________
Added: svn:eol-style
+ native
More information about the checkins
mailing list