diff test/db_test_base.py @ 6427:f08907bfd5a1

Fix find() with anydbm. Add fast return shortcut. Using protected properties raised KeyError. Add shortcut fast return. Both changes come from rdbms_common.py's find(). Add test case.
author John Rouillard <rouilj@ieee.org>
date Thu, 03 Jun 2021 21:48:28 -0400
parents dbacf6bf2a2f
children ada1edcc9132
line wrap: on
line diff
--- a/test/db_test_base.py	Thu May 27 16:40:10 2021 -0400
+++ b/test/db_test_base.py	Thu Jun 03 21:48:28 2021 -0400
@@ -1578,6 +1578,12 @@
         got.sort()
         self.assertEqual(got, [one, three])
 
+    def testFindProtectedLink(self):
+        one, two, three, four = self._find_test_setup()
+        got = self.db.issue.find(creator='1')
+        got.sort()
+        self.assertEqual(got, [one, two, three, four])
+
     def testFindRevLinkMultilink(self):
         ae, dummy = self.filteringSetupTransitiveSearch('user')
         ni = 'nosy_issues'

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