From 0ae4a19e08438d4787651df43c6c3a4ca45b25d4 Mon Sep 17 00:00:00 2001 From: Daniel Grana Date: Tue, 7 Oct 2008 13:01:32 +0000 Subject: [PATCH] remove hardcoded user/password for testing storedb --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40311 --- scrapy/trunk/scrapy/tests/test_storedb.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scrapy/trunk/scrapy/tests/test_storedb.py b/scrapy/trunk/scrapy/tests/test_storedb.py index 1a31dd1b7..31e43eebc 100644 --- a/scrapy/trunk/scrapy/tests/test_storedb.py +++ b/scrapy/trunk/scrapy/tests/test_storedb.py @@ -4,13 +4,14 @@ from time import sleep from twisted.trial import unittest -# This is the DB used for testing -TEST_DB = "mysql://root:r00tpass@localhost/scrapingtest" - class ProductComparisonTestCase(unittest.TestCase): """ Test product comparison functions """ def setUp(self): + TEST_DB = settings.get('TEST_DB') + if not TEST_DB: + raise unittest.SkipTest("TEST_DB not configured") + try: import MySQLdb from scrapy.utils.db import mysql_connect