Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
e18c8310
Commit
e18c8310
authored
12 years ago
by
Fabien Pinckaers
Browse files
Options
Downloads
Patches
Plain Diff
imp
bzr revid: fp@tinyerp.com-20120820104556-li9wfg2riqb85c8a
parent
7fc19eba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/mail/tests/write_test.py
+79
-0
79 additions, 0 deletions
addons/mail/tests/write_test.py
with
79 additions
and
0 deletions
addons/mail/tests/write_test.py
0 → 100644
+
79
−
0
View file @
e18c8310
##############################################################################
#
# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
# Fabien Pinckaers <fp@tiny.Be>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
#
# This module test all RPC methods
#
import
xmlrpclib
uid
=
1
passwd
=
'
admin
'
server
=
'
localhost
'
db
=
'
trunk
'
sock
=
xmlrpclib
.
ServerProxy
(
'
http://
'
+
server
+
'
:8069/xmlrpc/object
'
)
def
_print_data
(
data
,
level
=
0
):
for
d
in
data
:
print
'
'
*
level
,
d
[
'
id
'
]
_print_data
(
d
[
'
child_ids
'
],
level
+
1
)
print
'
With Domain
'
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
)],
'
thread_level
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
False
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
)],
1
)
_print_data
(
data
)
print
'
With Domain
'
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
)],
'
no thread_level
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
False
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
)],
0
)
_print_data
(
data
)
print
'
With Domain
'
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
),
(
'
parent_id
'
,
'
=
'
,
False
)],
'
thread_level=0
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
False
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
),
(
'
parent_id
'
,
'
=
'
,
False
)],
0
)
_print_data
(
data
)
print
'
With Domain
'
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
),
(
'
parent_id
'
,
'
=
'
,
False
)],
'
thread_level=2
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
False
,
[(
'
model
'
,
'
=
'
,
'
mail.group
'
),
(
'
parent_id
'
,
'
=
'
,
False
)],
2
)
_print_data
(
data
)
print
'
Fixed IDS
'
,
[
2
,
3
,
41
,
43
],
'
thread_level
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
[
2
,
3
,
41
,
43
],
[],
1
)
_print_data
(
data
)
print
'
Fixed IDS
'
,
[
2
,
43
],
'
no thread_level
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
[
2
,
43
],
[],
0
)
_print_data
(
data
)
print
'
Fixed IDS
'
,
[
2
,
43
],
'
thread_level
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
[
2
,
43
],
[],
1
)
_print_data
(
data
)
print
'
domain [id in 3,41]
'
,
'
thread_level
'
data
=
sock
.
execute
(
db
,
uid
,
passwd
,
'
mail.message
'
,
'
message_read
'
,
False
,
[(
'
id
'
,
'
in
'
,[
3
,
41
])],
1
)
_print_data
(
data
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment