Added test for db_key_to_title.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 11 Oct 2016 19:37:26 +0000 (19:37 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Tue, 11 Oct 2016 19:37:26 +0000 (19:37 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@2496 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/test_mwapi.py [new file with mode: 0644]

diff --git a/tests/test_mwapi.py b/tests/test_mwapi.py
new file mode 100644 (file)
index 0000000..86c255d
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/python3.4
+# -*- coding: utf-8 -*-
+# $Id$
+# $HeadURL$
+import unittest
+from wrpylib.mwapi import dbkey_to_title
+
+
+class TestMwApi(unittest.TestCase):
+    def test_dbkey_to_title(self):
+        self.assertEqual(dbkey_to_title('My_Title'), 'My Title')
+        self.assertEqual(dbkey_to_title('My Title'), 'My Title') # should not happen
+        self.assertEqual(dbkey_to_title('My_nice_Title'), 'My nice Title')