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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
83a2f63c
Commit
83a2f63c
authored
Aug 02, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: test: drop outdated tests
parent
d91eb97f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
112 deletions
+0
-112
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingAlarm.py
.../portal_components/test.erp5.testSlapOSAccountingAlarm.py
+0
-112
No files found.
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingAlarm.py
View file @
83a2f63c
...
...
@@ -27,7 +27,6 @@
##############################################################################
import
transaction
import
time
from
functools
import
wraps
from
Products.ERP5Type.tests.utils
import
createZODBPythonScript
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
,
withAbort
...
...
@@ -35,7 +34,6 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbo
import
os
import
tempfile
from
DateTime
import
DateTime
from
zExceptions
import
Unauthorized
AGGREGATE_SALE_TRADE_CONDITION_RELATIVE_URL
=
'sale_trade_condition_module/slapos_aggregated_trade_condition_v3'
...
...
@@ -496,116 +494,6 @@ class TestSlapOSStopConfirmedAggregatedSaleInvoiceTransactionAlarm(
portal_type
=
'Sale Invoice Transaction'
alarm
=
'slapos_stop_confirmed_aggregated_sale_invoice_transaction'
class
TestSlapOSUpdateOpenSaleOrderPeriod
(
SlapOSTestCaseMixin
):
def
createOpenOrder
(
self
):
open_order
=
self
.
portal
.
open_sale_order_module
.
newContent
(
portal_type
=
"Open Sale Order"
,
ledger
=
'automated'
,
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTHS-%s"
%
self
.
generateNewId
(),
)
open_order
.
order
()
open_order
.
validate
()
return
open_order
def
test_updatePeriod_REQUEST_disallowed
(
self
):
self
.
assertRaises
(
Unauthorized
,
self
.
portal
.
OpenSaleOrder_updatePeriod
,
REQUEST
=
{})
def
test_updatePeriod_no_person
(
self
):
open_order
=
self
.
createOpenOrder
()
open_order
.
OpenSaleOrder_updatePeriod
()
def
test_updatePeriod_validated
(
self
):
open_order
=
self
.
createOpenOrder
()
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
open_order
.
edit
(
destination_decision_value
=
person
,
)
open_order
.
newContent
(
portal_type
=
"Open Sale Order Line"
)
self
.
assertRaises
(
AssertionError
,
open_order
.
OpenSaleOrder_updatePeriod
)
def
test_updatePeriod_invalidated
(
self
):
open_order
=
self
.
createOpenOrder
()
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
open_order
.
edit
(
destination_decision_value
=
person
,
)
open_order
.
invalidate
()
open_order
.
newContent
(
portal_type
=
"Open Sale Order Line"
)
open_order
.
OpenSaleOrder_updatePeriod
()
def
test_alarm
(
self
):
open_order
=
self
.
createOpenOrder
()
open_order
.
newContent
(
portal_type
=
"Open Sale Order Line"
)
self
.
tic
()
script_name
=
"OpenSaleOrder_updatePeriod"
alarm
=
self
.
portal
.
portal_alarms
.
slapos_update_open_sale_order_period
self
.
_test_alarm
(
alarm
,
open_order
,
script_name
)
def
test_alarm_invalidated
(
self
):
open_order
=
self
.
createOpenOrder
()
open_order
.
newContent
(
portal_type
=
"Open Sale Order Line"
)
open_order
.
invalidate
()
self
.
tic
()
script_name
=
"OpenSaleOrder_updatePeriod"
alarm
=
self
.
portal
.
portal_alarms
.
slapos_update_open_sale_order_period
self
.
_test_alarm_not_visited
(
alarm
,
open_order
,
script_name
)
def
test_alarm_no_line
(
self
):
open_order
=
self
.
createOpenOrder
()
self
.
tic
()
script_name
=
"OpenSaleOrder_updatePeriod"
alarm
=
self
.
portal
.
portal_alarms
.
slapos_update_open_sale_order_period
self
.
_test_alarm_not_visited
(
alarm
,
open_order
,
script_name
)
class
TestSlapOSReindexOpenSaleOrder
(
SlapOSTestCaseMixin
):
def
createOpenOrder
(
self
):
return
self
.
portal
.
open_sale_order_module
.
newContent
(
portal_type
=
"Open Sale Order"
,
ledger
=
'automated'
,
title
=
self
.
generateNewSoftwareTitle
(),
reference
=
"TESTHS-%s"
%
self
.
generateNewId
(),
)
def
test_alarm
(
self
):
open_order
=
self
.
createOpenOrder
()
self
.
tic
()
# Jut wait a bit so the line has a different timestamp > 1 sec.
time
.
sleep
(
1
)
open_order
.
newContent
(
portal_type
=
"Open Sale Order Line"
)
self
.
tic
()
script_name
=
"OpenSaleOrder_reindexIfIndexedBeforeLine"
alarm
=
self
.
portal
.
portal_alarms
.
slapos_reindex_open_sale_order
self
.
_test_alarm
(
alarm
,
open_order
,
script_name
)
def
test_alarm_no_line
(
self
):
open_order
=
self
.
createOpenOrder
()
self
.
tic
()
script_name
=
"OpenSaleOrder_reindexIfIndexedBeforeLine"
alarm
=
self
.
portal
.
portal_alarms
.
slapos_reindex_open_sale_order
self
.
_test_alarm_not_visited
(
alarm
,
open_order
,
script_name
)
class
TestSlapOSGeneratePackingListFromTioXML
(
SlapOSTestCaseMixin
):
...
...
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