diff --git a/CHANGELOG b/CHANGELOG index e69de29..d7b2b9a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -0,0 +1,3 @@ +Version 3.4.0 - 2014-11-05 + + diff --git a/csv_import.py b/csv_import.py index 0a76eab..15ec0b4 100644 --- a/csv_import.py +++ b/csv_import.py @@ -4,7 +4,7 @@ from StringIO import StringIO from csv import reader from datetime import datetime -from trytond.config import CONFIG +from trytond.config import config from trytond.model import ModelSQL, ModelView, fields, Workflow from trytond.pool import Pool, PoolMeta from trytond.pyson import Eval, If @@ -166,7 +166,7 @@ class CSVArchive(Workflow, ModelSQL, ModelView): def get_data(self, name): cursor = Transaction().cursor - path = os.path.join(CONFIG.get('data_path', '/var/lib/trytond'), + path = os.path.join(config.get('data_path', '/var/lib/trytond'), cursor.database_name, 'csv_import') archive = '%s/%s' % (path, self.archive_name.replace(' ', '_')) try: @@ -181,7 +181,7 @@ class CSVArchive(Workflow, ModelSQL, ModelView): @classmethod def set_data(cls, archives, name, value): cursor = Transaction().cursor - path = os.path.join(CONFIG.get('data_path', '/var/lib/trytond'), + path = os.path.join(config.get('data_path', '/var/lib/trytond'), cursor.database_name, 'csv_import') if not os.path.exists(path): os.makedirs(path, mode=0777) diff --git a/setup.py b/setup.py index 8894848..2c1e5a9 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python -#This file is part csv_import module for Tryton. -#The COPYRIGHT file at the top level of this repository contains -#the full copyright notices and license terms. +# This file is part csv_import module for Tryton. +# The COPYRIGHT file at the top level of this repository contains +# the full copyright notices and license terms. from setuptools import setup import re import os diff --git a/tests/test_csv_import.py b/tests/test_csv_import.py index 6af07c8..07f477c 100644 --- a/tests/test_csv_import.py +++ b/tests/test_csv_import.py @@ -1,13 +1,6 @@ # This file is part of csv_import module for Tryton. # The COPYRIGHT file at the top level of this repository contains # the full copyright notices and license terms. -import sys -import os -DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, - '..', '..', '..', '..', '..', 'trytond'))) -if os.path.isdir(DIR): - sys.path.insert(0, os.path.dirname(DIR)) - import unittest import doctest import trytond.tests.test_tryton @@ -16,23 +9,17 @@ from trytond.backend.sqlite.database import Database as SQLiteDatabase class CSVImportTestCase(unittest.TestCase): - ''' - Test CSV Import module. - ''' + 'Test CSV Import module' def setUp(self): trytond.tests.test_tryton.install_module('csv_import') def test0005views(self): - ''' - Test views. - ''' + 'Test views' test_view('csv_import') def test0006depends(self): - ''' - Test depends. - ''' + 'Test depends' test_depends()