Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
erp5
Commits
20f05949
Commit
20f05949
authored
Oct 09, 2012
by
Mame Coumba Sall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revive test on naming convention
parent
b98afcd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
0 deletions
+90
-0
product/ERP5Type/tests/testERP5NamingConvention.py
product/ERP5Type/tests/testERP5NamingConvention.py
+90
-0
No files found.
product/ERP5Type/tests/testERP5NamingConvention.py
0 → 100644
View file @
20f05949
##############################################################################
#
# Copyright (c) 2007 Nexedi SARL and Contributors. All Rights Reserved.
# Kazuhiko <kazuhiko@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
#
# ERP5 Naming Convention Test script.
#
# usage: python runUnitTest.py [OPTION]... namingConventionTest.py
#
import
re
import
unittest
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestNamingConvention
(
ERP5TypeTestCase
):
def
getBusinessTemplateList
(
self
):
"""
Return the list of business templates.
"""
# include all standard Business Templates, i.e. erp5_*
return
(
'erp5_core_proxy_field_legacy'
,
'erp5_base'
,
'erp5_pdm'
,
'erp5_simulation'
,
'erp5_trade'
,
'erp5_accounting'
,
'erp5_apparel'
,
'erp5_mrp'
,
'erp5_project'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion'
,
'erp5_jquery'
,
'erp5_web'
,
'erp5_dms'
,
'erp5_csv_style'
,
'erp5_crm'
,
'erp5_budget'
,
'erp5_item'
,
'erp5_ui_test_core'
,
'erp5_ui_test'
,
'erp5_accounting_l10n_fr'
,
'erp5_invoicing'
,
'erp5_accounting_ui_test'
,
'erp5_banking_core'
,
'erp5_banking_cash'
,
'erp5_banking_check'
,
'erp5_banking_inventory'
,
'erp5_commerce'
,
'erp5_consulting'
,
'erp5_dummy_movement'
,
'erp5_forge'
,
'erp5_pdm'
,
'erp5_mobile'
,
'erp5_payroll'
,
'erp5_credential'
,
'erp5_jquery_ui'
,
'erp5_payroll_ui_test'
,
'erp5_pdf_editor'
,
'erp5_publication'
,
'erp5_dms_ui_test'
,
'erp5_administration'
,
'erp5_advanced_invoicing'
,
'erp5_apparel'
,
'erp5_archive'
,
'erp5_auto_logout'
,
'erp5_barcode'
,
'erp5_budget'
,
'erp5_calendar'
,
'erp5_knowledge_pad'
,
'erp5_km'
,
'erp5_oauth'
,
'erp5_ods_style'
,
'erp5_odt_style'
,
'erp5_ooo_import'
,
'erp5_open_trade'
,
'erp5_open_trade_periodicity_line'
,
'erp5_payment_mean'
,
'erp5_secure_payment'
,
'erp5_paypal_secure_payment'
,
'erp5_payzen_secure_payment'
,
'erp5_public_accounting_budget'
,
'erp5_publication'
,
'erp5_egov'
,
'erp5_rss_reader'
,
'erp5_rss_style'
,
'erp5_run_my_doc'
,
'erp5_short_message'
,
'erp5_simplified_invoicing'
,
'erp5_trade_knowledge_pad'
,
'erp5_trade_proxy_field_legacy'
,
'erp5_trade_ui_test'
,
# skip l10n templates to save time.
# 'erp5_l10n_fr', 'erp5_l10n_ja',
# 'erp5_l10n_pl_PL', 'erp5_l10n_pt-BR',
# 'erp5_accounting_l10n_fr_m14', 'erp5_accounting_l10n_fr_m9',
# 'erp5_accounting_l10n_pl',
# 'erp5_accounting_l10n_sn',
# 'erp5_accounting_l10n_in',
)
def
getTitle
(
self
):
return
"Naming Convention"
def
testNamingConvention
(
self
):
result
=
'installed templates: %s
\
n
'
%
repr
(
self
.
getBusinessTemplateList
())
result
+=
self
.
getPortal
().
portal_skins
.
erp5_core
.
ERP5Site_checkNamingConventions
(
html_output
=
None
)
problems_re
=
re
.
compile
(
'([0-9]+) problems found'
)
problems
=
int
(
problems_re
.
search
(
result
).
group
(
1
))
self
.
assertEquals
(
0
,
problems
,
result
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestNamingConvention
))
return
suite
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment