Made test_wrregioncache_table independent of wrregioncache.id.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 29 Jan 2017 22:19:03 +0000 (22:19 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 29 Jan 2017 22:19:03 +0000 (22:19 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@2630 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/test_wrmwdb.py

index 19d759cf6b71b6361ca6a0515f391c44d0d1a418..5ff54ef1efd6c619b4fc8b909d8f0e62d0340363 100644 (file)
@@ -50,7 +50,6 @@ class TestWrMwDb(unittest.TestCase):
 
     def test_wrregioncache_table(self):
         WrRegionCache = wrpylib.wrmwdb.wrregioncache_table(self.metadata)
-        wrregioncache = self.session.query(WrRegionCache).filter(WrRegionCache.c.id==43545).first()
-        self.assertEqual(wrregioncache.id, 43545)
+        wrregioncache = self.session.query(WrRegionCache).filter((WrRegionCache.c.region_id==27) & (WrRegionCache.c.page_id==54)).first()
         self.assertEqual(wrregioncache.region_id, 27)
         self.assertEqual(wrregioncache.page_id, 54)