Added test for table user in wrpylib.mwdb.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 29 Jan 2017 13:01:15 +0000 (13:01 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 29 Jan 2017 13:01:15 +0000 (13:01 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@2611 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/test_mwdb.py

index ccbda84719d1cffbcd31505e20603b56113f90fd..5cc2e6343e1820dd5edde09ba917e5a894380feb 100644 (file)
@@ -36,6 +36,12 @@ class TestMwDb(unittest.TestCase):
         text_table = self.session.query(TextTable).filter(TextTable.c.old_id == 51).first()
         self.assertEqual(text_table.old_id, 51)
 
         text_table = self.session.query(TextTable).filter(TextTable.c.old_id == 51).first()
         self.assertEqual(text_table.old_id, 51)
 
+    def test_user_table(self):
+        metadata = sqlalchemy.MetaData()
+        UserTable = wrpylib.mwdb.user_table(metadata)
+        user_table = self.session.query(UserTable).filter(UserTable.c.user_id == 5).first()
+        self.assertEqual(user_table.user_id, 5)
+
     def test_categorylinks_table(self):
         metadata = sqlalchemy.MetaData()
         CategorylinksTable = wrpylib.mwdb.categorylinks_table(metadata)
     def test_categorylinks_table(self):
         metadata = sqlalchemy.MetaData()
         CategorylinksTable = wrpylib.mwdb.categorylinks_table(metadata)