Update to 4.8 [CI SKIP]

This commit is contained in:
Javier Uribe 2018-07-11 09:09:14 +02:00
parent 0511770740
commit 24985aabcf
4 changed files with 19 additions and 21 deletions

View File

@ -7,7 +7,8 @@ pipeline:
image: ${IMAGE}
environment:
- CFLAGS=-O0
- TOX_TESTENV_PASSENV=CFLAGS
- DB_CACHE=/cache
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
commands:
- pip install tox

View File

@ -1,33 +1,29 @@
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
import unittest
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
from trytond.tests.test_tryton import suite as test_suite
from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT
from trytond.transaction import Transaction
from trytond.pool import Pool
class PartyCrossReferenceTestCase(ModuleTestCase):
"""Test Party Cross Reference module"""
module = 'party_cross_reference'
def setUp(self):
super(PartyCrossReferenceTestCase, self).setUp()
self.party = POOL.get('party.party')
self.cross_reference = POOL.get('party.cross_reference')
@with_transaction()
def test0010create_cross_reference(self):
with Transaction().start(DB_NAME, USER,
context=CONTEXT) as transaction:
pty1, pty2 = self.party.create([{
'name': 'Customer 1'}, {
'name': 'Customer 2'}])
cr1, = self.cross_reference.create([{
'party': pty1.id,
'dest_party': pty2.id,
'code': '001',
'name': 'P001'}])
transaction.commit()
pool = Pool()
Party = pool.get('party.party')
Reference = pool.get('party.cross_reference')
pty1, pty2 = Party.create([{
'name': 'Customer 1'}, {
'name': 'Customer 2'}])
cr1, = Reference.create([{
'party': pty1.id,
'dest_party': pty2.id,
'code': '001',
'name': 'P001'}])
def suite():

View File

@ -7,6 +7,7 @@ deps =
{py27,py34,py35,py36}-postgresql: psycopg2 >= 2.5
pypy-postgresql: psycopg2cffi >= 2.5
mysql: MySQL-python
sqlite: sqlitebck
setenv =
sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}

View File

@ -1,5 +1,5 @@
[tryton]
version=4.2.0
version=4.8.0
depends:
ir
res