[Zope3-checkins] CVS: Zope3/src/zope/app/browser/applicationcontrol/tests - test_runtimeinfoview.py:1.5

Godefroid Chapelle gotcha@swing.be
Tue, 8 Apr 2003 16:35:26 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/applicationcontrol/tests
In directory cvs.zope.org:/tmp/cvs-serv4411/tests

Modified Files:
	test_runtimeinfoview.py 
Log Message:
- i18n

- small refactoring in case no adapter is found for IRuntimeInfo plus test



=== Zope3/src/zope/app/browser/applicationcontrol/tests/test_runtimeinfoview.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/applicationcontrol/tests/test_runtimeinfoview.py:1.4	Tue Feb 11 21:17:01 2003
+++ Zope3/src/zope/app/browser/applicationcontrol/tests/test_runtimeinfoview.py	Tue Apr  8 16:35:26 2003
@@ -49,6 +49,24 @@
         test_keys.sort()
         self.failUnless(assert_keys == test_keys)
 
+        self.failUnless(test_format["ZopeVersion"] != "N/A")
+
+    def test_RuntimeInfoFailureView(self):
+        test_runtimeinfoview = self._TestView__newView(applicationController)
+
+        test_format = test_runtimeinfoview.runtimeInfo()
+        self.failUnless(isinstance(test_format, DictType))
+
+        assert_keys = ['ZopeVersion', 'PythonVersion', 'PythonPath',
+              'SystemPlatform', 'CommandLine', 'ProcessId', 'Uptime', 'Hint']
+        test_keys = test_format.keys()
+
+        assert_keys.sort()
+        test_keys.sort()
+        self.failUnless(assert_keys == test_keys)
+
+        self.failUnless(test_format["ZopeVersion"] == "N/A")
+
 def test_suite():
     return makeSuite(Test)