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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
a4426e1a
Commit
a4426e1a
authored
Jul 26, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testERP5Base: remove useless code
parent
cf5d4200
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
32 deletions
+11
-32
product/ERP5/tests/testERP5Base.py
product/ERP5/tests/testERP5Base.py
+11
-32
No files found.
product/ERP5/tests/testERP5Base.py
View file @
a4426e1a
...
...
@@ -44,21 +44,6 @@ class TestERP5Base(ERP5TypeTestCase):
Those are tests for erp5_base business template.
"""
# pseudo constants
RUN_ALL_TEST
=
1
QUIET
=
1
##################################
## ZopeTestCase Skeleton
##################################
def
getTitle
(
self
):
"""
Return the title of the current test set.
"""
return
"ERP5 Base"
def
getBusinessTemplateList
(
self
):
"""
...
...
@@ -741,17 +726,14 @@ class TestERP5Base(ERP5TypeTestCase):
organisation
.
getDefaultAddressCity
())
##################################
## Tests
##################################
def
test_
01_Organisation
(
self
,
quiet
=
QUIET
,
run
=
RUN_ALL_TEST
):
def
test_
Organisation
(
self
):
"""
Test basic behaviour of Organisation.
"""
if
not
run
:
return
sequence_list
=
SequenceList
()
step_list
=
[
'stepCreateOrganisation'
,
'stepSetOrganisationCategories'
...
...
@@ -760,14 +742,13 @@ class TestERP5Base(ERP5TypeTestCase):
]
sequence_string
=
' '
.
join
(
step_list
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
,
quiet
=
quiet
)
sequence_list
.
play
(
self
)
def
test_
02_Person
(
self
,
quiet
=
QUIET
,
run
=
RUN_ALL_TEST
):
def
test_
Person
(
self
):
"""
Test basic behaviour of Person.
"""
if
not
run
:
return
sequence_list
=
SequenceList
()
step_list
=
[
'stepCreatePerson'
,
'stepCreateOrganisation'
...
...
@@ -776,13 +757,12 @@ class TestERP5Base(ERP5TypeTestCase):
]
sequence_string
=
' '
.
join
(
step_list
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
,
quiet
=
quiet
)
sequence_list
.
play
(
self
)
def
test_
03_Subordination
(
self
,
quiet
=
QUIET
,
run
=
RUN_ALL_TEST
):
def
test_
Subordination
(
self
):
"""
Tests that career steps subordination properties behave correctly
"""
if
not
run
:
return
sequence_list
=
SequenceList
()
step_list
=
[
'stepCreatePerson'
,
'stepCreateOrganisation'
...
...
@@ -792,13 +772,12 @@ class TestERP5Base(ERP5TypeTestCase):
]
sequence_string
=
' '
.
join
(
step_list
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
,
quiet
=
quiet
)
sequence_list
.
play
(
self
)
def
test_
04_SubordinationAndAddress
(
self
,
quiet
=
QUIET
,
run
=
RUN_ALL_TEST
):
def
test_
SubordinationAndAddress
(
self
):
"""
Tests that career steps subordination properties behave correctly
"""
if
not
run
:
return
sequence_list
=
SequenceList
()
step_list
=
[
'stepCreatePerson'
,
'stepCreateOrganisation'
...
...
@@ -808,7 +787,7 @@ class TestERP5Base(ERP5TypeTestCase):
]
sequence_string
=
' '
.
join
(
step_list
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
,
quiet
=
quiet
)
sequence_list
.
play
(
self
)
def
test_SubordinationAcquisition
(
self
):
"""
...
...
@@ -832,7 +811,7 @@ class TestERP5Base(ERP5TypeTestCase):
# Dates
def
test_
05_DatesOnPerson
(
self
,
quiet
=
QUIET
,
run
=
RUN_ALL_TEST
):
def
test_
DatesOnPerson
(
self
):
"""Tests dates on Person objects.
"""
pers
=
self
.
getPersonModule
().
newContent
(
portal_type
=
'Person'
)
...
...
@@ -847,7 +826,7 @@ class TestERP5Base(ERP5TypeTestCase):
getattr
(
pers
.
getCreationDate
(),
slot
)(),
'Wrong creation date %s'
%
pers
.
getCreationDate
())
def
test_
06_DatesOnOrganisation
(
self
,
quiet
=
QUIET
,
run
=
RUN_ALL_TEST
):
def
test_
DatesOnOrganisation
(
self
):
"""Tests dates on Organisation objects.
"""
org
=
self
.
getOrganisationModule
().
newContent
(
portal_type
=
'Organisation'
)
...
...
@@ -861,7 +840,7 @@ class TestERP5Base(ERP5TypeTestCase):
getattr
(
org
.
getCreationDate
(),
slot
)(),
'Wrong creation date %s'
%
org
.
getCreationDate
())
def
test_
07_BirthplaceOnPerson
(
self
,
quiet
=
QUIET
,
run
=
RUN_ALL_TEST
):
def
test_
BirthplaceOnPerson
(
self
):
"""Tests birthplace on Person objects.
"""
pers
=
self
.
getPersonModule
().
newContent
(
portal_type
=
'Person'
)
...
...
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