From: Torsten Werner Date: Wed, 12 Jan 2011 21:11:23 +0000 (+0100) Subject: Use original dak.conf in tests/create_pickle_file.py. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a9036519676960ab44d827497782d2f303625a2;p=dak Use original dak.conf in tests/create_pickle_file.py. We don't want to use the test database for creating the pickle file. Signed-off-by: Torsten Werner --- diff --git a/tests/create_pickle_file.py b/tests/create_pickle_file.py index 55843a91..74c50a0e 100755 --- a/tests/create_pickle_file.py +++ b/tests/create_pickle_file.py @@ -3,14 +3,15 @@ # recreate the pickle file db-metadata-*.pkl that needs to be updated # after a database upgrade -from base_test import fixture from daklib.dbconn import DBConn from sqlalchemy import create_engine, __version__ import pickle +from os.path import abspath, dirname -pickle_filename = fixture('db-metadata-%s.pkl' % __version__) +DAK_TEST_DIR = dirname(abspath(__file__)) +pickle_filename = '%s/fixtures/db-metadata-%s.pkl' % (DAK_TEST_DIR, __version__) pickle_file = open(pickle_filename, 'w') metadata = DBConn().db_meta pickle.dump(metadata, pickle_file)