Cleanup tests
This commit is contained in:
parent
87b2e8bdd9
commit
ef4a32ba13
|
@ -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)
|
||||
|
|
6
setup.py
6
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
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue