diff test/test_memorydb.py @ 6802:044dcf3608a2

update session db tests session_common.py: testList had no asserts. While adding them I found out the memory and anydbm backends return byte strings while the rdbms backend return strings. So added a call to s2b defined in each db test file to covert. rdbms i a no-op and memory/anydbm call roundup.anypy.strings::s2b(). also add some data to other tests and verify it. other files: define s2b appropriately.
author John Rouillard <rouilj@ieee.org>
date Mon, 25 Jul 2022 15:02:30 -0400
parents 7f00fc5958ca
children bdd28b244839
line wrap: on
line diff
--- a/test/test_memorydb.py	Mon Jul 25 14:28:31 2022 -0400
+++ b/test/test_memorydb.py	Mon Jul 25 15:02:30 2022 -0400
@@ -5,6 +5,8 @@
 from .db_test_base import DBTest, ROTest, SchemaTest, config, setupSchema
 from roundup.test import memorydb
 
+from roundup.anypy import strings
+
 class memorydbOpener:
     module = memorydb
 
@@ -54,6 +56,8 @@
 
 from .session_common import SessionTest
 class memorydbSessionTest(memorydbOpener, SessionTest, unittest.TestCase):
+    s2b = lambda x,y: strings.s2b(y)
+
     def setUp(self):
         self.db = self.module.Database(config, 'admin')
         setupSchema(self.db, 1, self.module)

Roundup Issue Tracker: http://roundup-tracker.org/