From f6b04008439d80637207a989366c488294fd97a4 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Wed, 12 Jan 2011 22:04:10 +0100 Subject: [PATCH] Avoid production database names in dbtest code. Signed-off-by: Torsten Werner --- tests/db_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/db_test.py b/tests/db_test.py index 7e013c24..d8c976af 100644 --- a/tests/db_test.py +++ b/tests/db_test.py @@ -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"] -- 2.39.5