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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
5b079ba9
Commit
5b079ba9
authored
Feb 03, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that unlimited account can be locked
parent
2a287227
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
2 deletions
+86
-2
master/product/Vifib/tests/testVifibSlapComputerPartitionLock.py
...product/Vifib/tests/testVifibSlapComputerPartitionLock.py
+86
-2
No files found.
master/product/Vifib/tests/testVifibSlapComputerPartitionLock.py
View file @
5b079ba9
...
@@ -35,18 +35,25 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
...
@@ -35,18 +35,25 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
def
stepCheckPersonLockedState
(
self
,
sequence
,
**
kw
):
def
stepCheckPersonLockedState
(
self
,
sequence
,
**
kw
):
"""
"""
Check that person
payment state is the same than slap state
Check that person
slap state is locked
"""
"""
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
self
.
assertEquals
(
'locked'
,
person
.
getSlapState
())
self
.
assertEquals
(
'locked'
,
person
.
getSlapState
())
def
stepCheckPersonUnlockedState
(
self
,
sequence
,
**
kw
):
def
stepCheckPersonUnlockedState
(
self
,
sequence
,
**
kw
):
"""
"""
Check that person
payment state is the same than slap state
Check that person
slap state is unlocked
"""
"""
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
self
.
assertEquals
(
'unlocked'
,
person
.
getSlapState
())
self
.
assertEquals
(
'unlocked'
,
person
.
getSlapState
())
def
stepCheckPersonUnlimitedState
(
self
,
sequence
,
**
kw
):
"""
Check that person slap state is unlimited
"""
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
self
.
assertEquals
(
'unlimited'
,
person
.
getSlapState
())
register_new_user_sequence_string
=
'
\
register_new_user_sequence_string
=
'
\
Logout
\
Logout
\
RequestCredentialFromWebSite
\
RequestCredentialFromWebSite
\
...
@@ -150,6 +157,14 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
...
@@ -150,6 +157,14 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
"""
"""
self
.
portal
.
portal_alarms
.
vifib_lock_person
.
activeSense
()
self
.
portal
.
portal_alarms
.
vifib_lock_person
.
activeSense
()
def
stepUnlimitPerson
(
self
,
sequence
,
**
kw
):
"""
Unlimit user access
"""
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
(
sequence
[
'web_user'
])
person
.
unlimit
()
def
test_automated_person_without_payment_unlocking
(
self
):
def
test_automated_person_without_payment_unlocking
(
self
):
"""Test that a person is automatically unlocked by an alarm if no payment
"""Test that a person is automatically unlocked by an alarm if no payment
"""
"""
...
@@ -377,6 +392,45 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
...
@@ -377,6 +392,45 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
def
test_automated_unlimited_person_past_not_paid_locking
(
self
):
"""Test that an unlimited person is automatically locked by
an alarm if payment has not been done for a long time.
"""
sequence_list
=
SequenceList
()
sequence_string
=
self
.
register_new_user_sequence_string
+
'
\
LoginERP5TypeTestCase
\
TriggerUnlockPersonAlarm
\
Tic
\
UnlimitPerson
\
Tic
\
Logout
\
\
LoginWebUser
\
CheckPersonUnlimitedState
\
Tic
\
Logout
\
\
LoginERP5TypeTestCase
\
CreatePastSmallPayment
\
Tic
\
Logout
\
\
TriggerLockPersonAlarm
\
Tic
\
Logout
\
\
LoginWebUser
\
CheckPersonLockedState
\
Tic
\
Logout
\
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
stepCreateHighBalanceInvoiceWebUser
(
self
,
sequence
,
**
kw
):
def
stepCreateHighBalanceInvoiceWebUser
(
self
,
sequence
,
**
kw
):
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
(
sequence
[
person
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
(
sequence
[
'web_user'
])
'web_user'
])
...
@@ -426,6 +480,36 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
...
@@ -426,6 +480,36 @@ class TestVifibSlapComputerPartitionLock(TestVifibSlapWebServiceMixin):
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
sequence_list
.
play
(
self
)
def
test_automated_unlimited_person_high_not_paid_locking
(
self
):
"""Test that an unlimited person is automatically locked by
an alarm if payment has an high quantity
"""
sequence_list
=
SequenceList
()
sequence_string
=
self
.
register_new_user_sequence_string
+
'
\
LoginERP5TypeTestCase
\
TriggerUnlockPersonAlarm
\
Tic
\
UnlimitPerson
\
Tic
\
Logout
\
\
LoginWebUser
\
CheckPersonUnlimitedState
\
Tic
\
Logout
\
'
+
self
.
lock_user_string
()
+
'
\
LoginWebUser
\
CheckPersonLockedState
\
Tic
\
Logout
\
\
LoginERP5TypeTestCase
\
CheckSiteConsistency
\
Logout
\
'
sequence_list
.
addSequenceString
(
sequence_string
)
sequence_list
.
play
(
self
)
def
test_automated_person_with_ongoing_payment_unlocking
(
self
):
def
test_automated_person_with_ongoing_payment_unlocking
(
self
):
"""Test that a person is can not be unlocked if there is an ongoing
"""Test that a person is can not be unlocked if there is an ongoing
payment.
payment.
...
...
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