From: Torsten Werner Date: Wed, 12 Jan 2011 21:04:10 +0000 (+0100) Subject: Avoid production database names in dbtest code. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6b04008439d80637207a989366c488294fd97a4;p=dak Avoid production database names in dbtest code. Signed-off-by: Torsten Werner --- 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"]