Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Roque
slapos.core
Commits
1aae08a5
Commit
1aae08a5
authored
Apr 06, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
slapos_erp5: Add test to review ignore list from code style test
See merge request
nexedi/slapos.core!511
parents
7414015b
5abc8535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
6 deletions
+32
-6
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
...Item/portal_components/test.erp5.testSlapOSCodingStyle.py
+32
-6
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
View file @
1aae08a5
...
...
@@ -133,11 +133,9 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_crm_monitoring/ComputeNodeModule_getComputeNodeTicketReportList'
,
'slapos_crm_monitoring/ComputeNodeModule_getComputeNodeTicketReportSectionList'
,
'slapos_crm_monitoring/ComputeNode_checkInstanceOnCloseAllocation'
,
'slapos_crm_monitoring/ComputeNode_getRelatedSupportRequestList'
,
'slapos_crm_monitoring/InstanceTreeModule_getResilienceUsageReportList'
,
'slapos_crm_monitoring/InstanceTreeModule_getResilienceUsageReportSectionList'
,
'slapos_crm_monitoring/InstanceTreeModule_getUsageReportList'
,
'slapos_crm_monitoring/Person_hasRequiredRole'
,
'slapos_crm_monitoring/SiteMessage_setSlapOSUserSourceAndDestinatationList'
,
'slapos_crm_monitoring/SupportRequestModule_exportMonitoringOPMLDescriptionList'
,
'slapos_crm_monitoring/SupportRequestModule_getInstanceMessageList'
,
...
...
@@ -174,7 +172,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_simulation/SimulationMovement_testPaymentSimulationRule'
,
'slapos_simulation/SimulationMovement_testTradeModelSimulationRule'
,
'slapos_accounting/Base_testSlapOSValidTradeCondition'
,
'slapos_accounting/ERP5Site_zGetOpenOrderWithModifiedLineUid'
,
'slapos_accounting/OrderBuilder_generateSlapOSAggregatedMovementList'
,
'slapos_accounting/OrderBuilder_selectSlapOSAggregatedDeliveryList'
,
'slapos_accounting/PaymentTransaction_getExternalPaymentId'
,
...
...
@@ -250,7 +247,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_hal_json_style/Organisation_hasItem'
,
'slapos_hal_json_style/PasswordTool_changeUserPassword'
,
'slapos_hal_json_style/PaymentTransaction_redirectToManualFreePayment'
,
'slapos_hal_json_style/PaymentTransaction_redirectToManualSlapOSPayment'
,
'slapos_hal_json_style/Person_getAssignmentDestinationList'
,
'slapos_hal_json_style/Person_getCloudContractRelated'
,
'slapos_hal_json_style/Person_requestComputeNode'
,
...
...
@@ -278,7 +274,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_administration/ActivityTool_zGetDateForSQLQueueMessage'
,
'slapos_administration/Base_checkStoredBrokenState'
,
'slapos_administration/ERP5Site_adjustProductionClone'
,
'slapos_administration/ERP5Site_assertDumpedConfiguration'
,
'slapos_administration/ERP5Site_cleanUnusedSecurityUid'
,
'slapos_administration/ERP5Site_getSecurityUidStat'
,
'slapos_administration/ERP5Site_updateAllLocalRolesOnSecurityGroupsForSlapOS'
,
...
...
@@ -333,7 +328,6 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
'slapos_disaster_recovery/ERP5Site_recoverFromRestoration'
,
'slapos_disaster_recovery/ERP5Site_reindexOrUnindexDocumentList'
,
'slapos_disaster_recovery/ERP5Site_unindexDeletedDocumentList'
,
'slapos_base/Base_acceptContractInvitation'
,
'slapos_base/ERP5Login_isLoginBlocked'
,
'slapos_base/ERP5Login_isPasswordExpired'
,
'slapos_base/Login_getFastExpirationReferenceList'
,
...
...
@@ -363,6 +357,38 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
# we define it for CodingStyleTestCase.test_PythonSourceCode
return
(
'erp5_administration'
,
)
def
test_ReviewPythonScriptTestCoverageIgnoreList
(
self
):
content_dict
=
{}
for
test_component
in
self
.
portal
.
portal_components
.
searchFolder
(
portal_type
=
'Test Component'
):
if
"Slap"
not
in
test_component
.
getId
()
or
\
"testSlapOSCodingStyle"
in
test_component
.
getId
():
continue
content_dict
[
test_component
.
getId
()]
=
test_component
.
getTextContent
()
self
.
assertNotEqual
(
len
(
content_dict
),
0
)
skin_id_set
=
set
()
for
business_template
in
self
.
_getTestedBusinessTemplateValueList
():
skin_id_set
.
update
(
business_template
.
getTemplateSkinIdList
())
skin_id_list
=
list
(
skin_id_set
)
message_list
=
[]
for
skin_path
in
self
.
coverage_ignore_path_list
:
skin_id
,
document_id
=
skin_path
.
split
(
"/"
)
if
skin_id
in
skin_id_list
:
try
:
document
=
self
.
portal
.
portal_skins
[
skin_id
][
document_id
]
for
_
,
content
in
content_dict
.
iteritems
():
if
document
.
getId
()
in
content
:
message_list
.
append
(
skin_path
)
break
except
KeyError
:
message_list
.
append
(
skin_path
)
self
.
assertEqual
([],
message_list
)
def
test_PythonScriptTestCoverage
(
self
):
content_dict
=
{}
for
test_component
in
self
.
portal
.
portal_components
.
searchFolder
(
...
...
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