def test_01(self, z0ctx): # sts = TEST_SUCCESS res = {} if not z0ctx['dry_run']: # Build Odoo enviroment self.root = Z0BUG.build_os_tree(z0ctx, []) remote = 'OCA' reponame = 'OCB' branch = '10.0' odoo_path = os.path.join(self.root, branch) Z0testOdoo.git_clone(remote, reponame, branch, odoo_path) sys.path.append(odoo_path) from z0bug_odoo import z0bug_odoo_lib res = z0bug_odoo_lib.Z0bugOdoo().get_test_values( 'res.partner', 'z0bug.res_partner_1') sts = self.Z.test_result(z0ctx, 'get_test_values()', bool(res), True) TEST = { 'customer': 'True', 'name': 'Prima Distribuzione S.p.A.', 'street': 'Via I Maggio, 11', 'zip': '20022', 'city': 'Castano Primo', 'email': '*****@*****.**', 'website': 'www.prima-distribuzione.it', 'phone': '+39 0255582285', 'vat': 'IT00115719999' } for nm in TEST: sts += self.Z.test_result(z0ctx, 'partner.%s' % nm, res.get(nm), TEST[nm]) return sts
""" from __future__ import print_function,unicode_literals from past.builtins import basestring # import pdb import os import os.path import sys from zerobug import Z0BUG __version__ = "0.2.14.16" MODULE_ID = 'zerobug' TEST_FAILED = 1 TEST_SUCCESS = 0 def version(): return __version__ # Run main if executed as a script if __name__ == "__main__": UT_LIST = ["__doctest_${rundir}/docs/description.rst"] exit(Z0BUG.main( Z0BUG.parseoptest( sys.argv[1:], version=version()), UT=UT_LIST))
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015-2019 SHS-AV s.r.l. (<http://www.zeroincombenze.org>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). """ python_plus unit test library for python programs Regression Test Suite """ from __future__ import print_function, unicode_literals # import pdb import os import os.path import sys from zerobug import Z0BUG from python_plus import isbytestr, qsplit MODULE_ID = 'python_plus' TEST_FAILED = 1 TEST_SUCCESS = 0 __version__ = "0.1.1" def version(): return __version__ if __name__ == "__main__": exit(Z0BUG.main(Z0BUG.parseoptest(sys.argv[1:], version=version())))
reponame = 'OCB' branch = '10.0' odoo_path = os.path.join(self.root, branch) Z0testOdoo.git_clone(remote, reponame, branch, odoo_path) sys.path.append(odoo_path) from z0bug_odoo import z0bug_odoo_lib res = z0bug_odoo_lib.Z0bugOdoo().get_test_values( 'res.partner', 'z0bug.res_partner_1') sts = self.Z.test_result(z0ctx, 'get_test_values()', bool(res), True) TEST = { 'customer': 'True', 'name': 'Prima Distribuzione S.p.A.', 'street': 'Via I Maggio, 11', 'zip': '20022', 'city': 'Castano Primo', 'email': '*****@*****.**', 'website': 'www.prima-distribuzione.it', 'phone': '+39 0255582285', 'vat': 'IT00115719999' } for nm in TEST: sts += self.Z.test_result(z0ctx, 'partner.%s' % nm, res.get(nm), TEST[nm]) return sts if __name__ == "__main__": exit( Z0BUG.main_local(Z0BUG.parseoptest(sys.argv[1:], version=version()), RegressionTest))
from zerobug import Z0BUG __version__ = "0.2.14.16" MODULE_ID = 'zerobug' TEST_FAILED = 1 TEST_SUCCESS = 0 def version(): return __version__ # Run main if executed as a script if __name__ == "__main__": ctx = Z0BUG.parseoptest(sys.argv[1:], version=version()) if os.name == 'posix': if os.environ.get('HOSTENV', '') == 'travis': UT_LIST = ["__version_0_" + __version__] else: UT_LIST = [ "__version_0_" + __version__, "__version_1_0.2.8.8%s/tools/z0lib/z0librc" % os.environ.get('HOME', '') ] UT_LIST.append("__version_V_0.2.0${testdir}/dummy_01.py") UT_LIST.append("__version_v_0.2.1${testdir}/dummy_01.py") UT_LIST.append("__version_P_0.2.2${testdir}/dummy_01.py") else: # pragma: no cover UT_LIST = [ "__version_0_" + __version__,