Index: main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_helpers.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_helpers.py	(revision 11823)
+++ main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_helpers.py	(revision 11824)
@@ -537,4 +537,51 @@
         self.assertEqual(helpers.check_csv_charset(csv), 2)
 
+
+class MemInfoTestCase(unittest.TestCase):
+
+    def test_getsetattrs(self):
+        # we can set/get attributes of MemInfos
+        info = helpers.MemInfo()
+        self.assertRaises(
+            KeyError, info.__getattr__, 'foo')
+        info['foo'] = 'bar'
+        assert info.foo == 'bar'
+        info.bar = 'baz'
+        assert info.bar == 'baz'
+
+    def test_getattrs(self):
+        # we can del attributes
+        info = helpers.MemInfo()
+        info['foo'] = 'bar'
+        del info['foo']
+        self.assertRaises(
+            KeyError, info.__getattr__, 'foo')
+        info['bar'] = 'baz'
+        del info.bar
+        self.assertRaises(
+            KeyError, info.__getattr__, 'bar')
+
+
+class GetMemInfoTestCase(unittest.TestCase):
+
+    @unittest.skipIf(
+        not os.path.exists('/proc/meminfo'),
+        reason="No /proc/meminfo found.")
+    def test_system(self):
+        info = helpers.get_meminfo()
+        assert isinstance(info, helpers.MemInfo)
+
+    def test_values(self):
+        sample_meminfo = os.path.join(
+            os.path.dirname(__file__), 'sample_meminfo')
+        info = helpers.get_meminfo(src=sample_meminfo)
+        assert info.Cached == 1013816
+
+    def test_invalid_src(self):
+        # we cope with invalid src files
+        info = helpers.get_meminfo(src="nOt-ExIsTiNg-FiLe")
+        assert info is None
+
+
 def test_suite():
     suite = unittest.TestSuite()
@@ -554,4 +601,6 @@
         SimpleHelpersTestCase,
         CheckCSVCharsetTestCase,
+        MemInfoTestCase,
+        GetMemInfoTestCase,
         ]:
         suite.addTests(
