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
Xavier Thompson
erp5
Commits
80181d7e
Commit
80181d7e
authored
Oct 24, 2013
by
Mame Coumba Sall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify test since now all mvts are taken into account by stock, checking has to change also
parent
2e47947e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
product/ERP5/tests/testAccounting.py
product/ERP5/tests/testAccounting.py
+6
-6
No files found.
product/ERP5/tests/testAccounting.py
View file @
80181d7e
...
@@ -1292,7 +1292,7 @@ class TestClosingPeriod(AccountingTestCase):
...
@@ -1292,7 +1292,7 @@ class TestClosingPeriod(AccountingTestCase):
# now check content of stock table
# now check content of stock table
q
=
self
.
portal
.
erp5_sql_connection
.
manage_test
q
=
self
.
portal
.
erp5_sql_connection
.
manage_test
# 3 lines, one with quantity 3.3, 2 with quantity 0
# 3 lines, one with quantity 3.3, 2 with quantity 0
self
.
assertEquals
(
1
,
q
(
self
.
assertEquals
(
2
,
q
(
"SELECT count(*) FROM stock WHERE portal_type="
"SELECT count(*) FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
0
][
0
])
self
.
assertAlmostEquals
(
3.3
,
q
(
self
.
assertAlmostEquals
(
3.3
,
q
(
...
@@ -1308,10 +1308,10 @@ class TestClosingPeriod(AccountingTestCase):
...
@@ -1308,10 +1308,10 @@ class TestClosingPeriod(AccountingTestCase):
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
0
][
0
])
self
.
assertEquals
(
self
.
section
.
getUid
(),
q
(
self
.
assertEquals
(
self
.
section
.
getUid
(),
q
(
"SELECT section_uid FROM stock WHERE portal_type="
"SELECT section_uid FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
1
][
0
])
self
.
assertEquals
(
None
,
q
(
self
.
assertEquals
(
None
,
q
(
"SELECT mirror_section_uid FROM stock WHERE portal_type="
"SELECT mirror_section_uid FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
1
][
0
])
self
.
assertEquals
(
pl
.
getUid
(),
q
(
self
.
assertEquals
(
pl
.
getUid
(),
q
(
"SELECT node_uid FROM stock WHERE portal_type="
"SELECT node_uid FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
0
][
0
])
...
@@ -1428,7 +1428,7 @@ class TestClosingPeriod(AccountingTestCase):
...
@@ -1428,7 +1428,7 @@ class TestClosingPeriod(AccountingTestCase):
# now check content of stock table
# now check content of stock table
q
=
self
.
portal
.
erp5_sql_connection
.
manage_test
q
=
self
.
portal
.
erp5_sql_connection
.
manage_test
self
.
assertEquals
(
1
,
q
(
self
.
assertEquals
(
2
,
q
(
"SELECT count(*) FROM stock WHERE portal_type="
"SELECT count(*) FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
0
][
0
])
self
.
assertAlmostEquals
(
3.3
,
q
(
self
.
assertAlmostEquals
(
3.3
,
q
(
...
@@ -1444,10 +1444,10 @@ class TestClosingPeriod(AccountingTestCase):
...
@@ -1444,10 +1444,10 @@ class TestClosingPeriod(AccountingTestCase):
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
0
][
0
])
self
.
assertEquals
(
self
.
section
.
getUid
(),
q
(
self
.
assertEquals
(
self
.
section
.
getUid
(),
q
(
"SELECT section_uid FROM stock WHERE portal_type="
"SELECT section_uid FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
1
][
0
])
self
.
assertEquals
(
None
,
q
(
self
.
assertEquals
(
None
,
q
(
"SELECT mirror_section_uid FROM stock WHERE portal_type="
"SELECT mirror_section_uid FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
1
][
0
])
self
.
assertEquals
(
pl
.
getUid
(),
q
(
self
.
assertEquals
(
pl
.
getUid
(),
q
(
"SELECT node_uid FROM stock WHERE portal_type="
"SELECT node_uid FROM stock WHERE portal_type="
"'Balance Transaction Line'"
)[
0
][
0
])
"'Balance Transaction Line'"
)[
0
][
0
])
...
...
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