Adapted to 3.4
This commit is contained in:
parent
ebf4e58450
commit
3fbb5365b5
2
farm.py
2
farm.py
|
@ -170,7 +170,7 @@ class CreateBreeding(Wizard):
|
|||
breeding_group.save()
|
||||
|
||||
breeding_account.name = breeding_group.number
|
||||
breeding_account.animal_groups.append(breeding_group.id)
|
||||
breeding_account.animal_groups += (breeding_group.id,)
|
||||
breeding_account.save()
|
||||
|
||||
setattr(self.start.location,
|
||||
|
|
|
@ -1,20 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
# 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
|
||||
# TODO: Remove if no sceneario needed
|
||||
# import doctest
|
||||
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import test_view, test_depends
|
||||
# TODO: Remove if no scenario needed
|
||||
# from trytond.backend.sqlite.database import Database as SQLiteDatabase
|
||||
|
||||
|
||||
class TestCase(unittest.TestCase):
|
||||
|
@ -38,25 +27,7 @@ class TestCase(unittest.TestCase):
|
|||
test_depends()
|
||||
|
||||
|
||||
# TODO: Remove if no scenario needed
|
||||
# def doctest_dropdb(test):
|
||||
# database = SQLiteDatabase().connect()
|
||||
# cursor = database.cursor(autocommit=True)
|
||||
# try:
|
||||
# database.drop(cursor, ':memory:')
|
||||
# cursor.commit()
|
||||
# finally:
|
||||
# cursor.close()
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestCase))
|
||||
# TODO: Remove if no scenario needed
|
||||
#suite.addTests(doctest.DocFileSuite('scenario_invoice.rst',
|
||||
# setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
|
||||
# optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=3.0.0
|
||||
version=3.4.0
|
||||
depends:
|
||||
analytic_account
|
||||
analytic_line_state
|
||||
|
|
Loading…
Reference in New Issue