]> err.no Git - dak/commitdiff
Avoid production database names in dbtest code.
authorTorsten Werner <twerner@debian.org>
Wed, 12 Jan 2011 21:04:10 +0000 (22:04 +0100)
committerTorsten Werner <twerner@debian.org>
Wed, 12 Jan 2011 21:04:10 +0000 (22:04 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
tests/db_test.py

index 7e013c2421e4ed696b6289cc785fcb722529f6a8..d8c976af3a8692b3d4312e9d72b94fef4c2a90d9 100644 (file)
@@ -17,6 +17,9 @@ warnings.filterwarnings('ignore', \
 class DBDakTestCase(DakTestCase):
     def setUp(self):
         cnf = Config()
+        if cnf["DB::Name"] in ('backports', 'obscurity', 'projectb'):
+            self.fail("You have configured an invalid database name: '%s'." % \
+                    cnf["DB::Name"])
         if cnf["DB::Host"]:
             # TCP/IP
             connstr = "postgres://%s" % cnf["DB::Host"]