Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(342)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 2550042: Tryton simple business test scenario with proteus

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 2 months ago by udono
Modified:
12 years, 5 months ago
Visibility:
Public.
Tryton simple business test scenario with proteus. Start tests with: $ python -m doctest -v scenario_simple.rst N.B. Proteus must be in PYTHONPATH or linked into the tests/ directory. For now you need to patch the Proteus client library with the patch given by this review: http://codereview.appspot.com/2586041

Patch Set 1 #

Patch Set 2 : Set config to sqlite :memory: #

Total comments: 18

Patch Set 3 : Add feedback, remove debug to comments #

Patch Set 4 : Add tracebacks to the lines which produce them #

Patch Set 5 : Invoice creation is working now. Factor out general documentation #

Created: 15 years, 2 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+778 lines, -0 lines) Patch
M scenario_simple.rst View 1 2 3 4 1 chunk +649 lines, -0 lines 0 comments Download
M scenarios.rst View 1 chunk +129 lines, -0 lines 0 comments Download
Total messages: 14
|
udono
On my installation all steps working well, but invoice creation fails. Maybe you find the ...
15 years, 2 months ago (2010年10月18日 13:52:48 UTC) #1
On my installation all steps working well, but invoice creation fails. Maybe you
find the mistake?
Sign in to reply to this message.
pheller
Looks pretty good. Once you're finished with the technical review, I'm happy to proofread and ...
15 years, 2 months ago (2010年10月18日 14:29:06 UTC) #2
Looks pretty good.
Once you're finished with the technical review, I'm happy to proofread and edit
the prose for grammatical correctness, if you wish.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst
File scenario_simple.rst (right):
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode507
scenario_simple.rst:507: >>> (supplier_tax,) = Tax.find([
You've already defined supplier_tax and customer_tax at lines 481 and 485... do
you need to do it again?
Sign in to reply to this message.
yangoon1
Will test later http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst File scenario_simple.rst (right): http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode2 scenario_simple.rst:2: Simple Busines Scenarios Business http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode11 scenario_simple.rst:11: ...
15 years, 2 months ago (2010年10月18日 14:31:25 UTC) #3
Will test later
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst
File scenario_simple.rst (right):
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode2
scenario_simple.rst:2: Simple Busines Scenarios
Business
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode11
scenario_simple.rst:11: recipe. This implies, that each step could need one or
more predessessing
predecessing
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode17
scenario_simple.rst:17: The testing aspect of this document should ensure that
Tryton runs as an
runs the way
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode18
scenario_simple.rst:18: end user would expect it to run in a defined setup.
These tests dependend
depend
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode20
scenario_simple.rst:20: No other modules are expected.
required.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode23
scenario_simple.rst:23: business procedures. Tests are restricted to successful
try
are restricted to test the success...
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode24
scenario_simple.rst:24: out given functionalities and beating user level errors
and
and defeat user level errors...
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode28
scenario_simple.rst:28: Business level tests should be usefull to detect
regressions in main
useful
Sign in to reply to this message.
bch
Haven't you any traceback when the invoice creation fail ?
15 years, 2 months ago (2010年10月18日 14:52:18 UTC) #4
Haven't you any traceback when the invoice creation fail ?
Sign in to reply to this message.
udono
On 2010年10月18日 14:52:18, bch wrote: > Haven't you any traceback when the invoice creation fail ...
15 years, 2 months ago (2010年10月18日 15:30:35 UTC) #5
On 2010年10月18日 14:52:18, bch wrote:
> Haven't you any traceback when the invoice creation fail ?
Yes, I have:
>>> invoice.lines.append(invoice_line1)
Trying:
 invoice.lines.append(invoice_line1)
Expecting nothing
**********************************************************************
File "setup.rst", line 666, in scenario_simple.rst
Failed example:
 invoice.lines.append(invoice_line1)
Exception raised:
Traceback (most recent call last):
 File "<console>", line 1, in <module>
 File "proteus/__init__.py", line 192, in append
 self._changed()
 File "proteus/__init__.py", line 179, in _changed
 self.parent._on_change(self.parent_field_name)
 File "proteus/__init__.py", line 536, in _on_change
 self._set_on_change(field, value)
 File "proteus/__init__.py", line 504, in _set_on_change
 list.append(getattr(self, field), relation(*vals))
TypeError: __init__() takes at most 2 arguments (11 given)
Here I checked the values in proteus/__init__.py:
>>> field, value: taxes {'account': 8, 'description': u'Received tax', 'manual':
False, 'tax': 1, 'base_sign': Decimal('1.0'), 'tax_code': 5, 'amount':
Decimal('20.00'), 'base': Decimal('100.00'), 'base_code': 2, 'tax_sign':
Decimal('1.0')}
Then following some other (dependend) errors
Sign in to reply to this message.
udono
On 2010年10月18日 14:29:06, pheller wrote: > Looks pretty good. > > Once you're finished with ...
15 years, 2 months ago (2010年10月18日 15:45:21 UTC) #6
On 2010年10月18日 14:29:06, pheller wrote:
> Looks pretty good.
> 
> Once you're finished with the technical review, I'm happy to proofread and
edit
> the prose for grammatical correctness, if you wish.
> 
> http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst
> File scenario_simple.rst (right):
> 
> http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode507
> scenario_simple.rst:507: >>> (supplier_tax,) = Tax.find([
> You've already defined supplier_tax and customer_tax at lines 481 and 485... 
do
> you need to do it again?
It seems I need to have them goth time, because I get problems with an error
about supplier_tax_parent is None or something like this.
Sign in to reply to this message.
udono
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst File scenario_simple.rst (right): http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode2 scenario_simple.rst:2: Simple Busines Scenarios On 2010年10月18日 14:31:25, yangoon wrote: > ...
15 years, 2 months ago (2010年10月19日 08:41:21 UTC) #7
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst
File scenario_simple.rst (right):
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode2
scenario_simple.rst:2: Simple Busines Scenarios
On 2010年10月18日 14:31:25, yangoon wrote:
> Business
Done.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode11
scenario_simple.rst:11: recipe. This implies, that each step could need one or
more predessessing
On 2010年10月18日 14:31:25, yangoon wrote:
> predecessing
Done.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode17
scenario_simple.rst:17: The testing aspect of this document should ensure that
Tryton runs as an
On 2010年10月18日 14:31:25, yangoon wrote:
> runs the way
Done.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode18
scenario_simple.rst:18: end user would expect it to run in a defined setup.
These tests dependend
On 2010年10月18日 14:31:25, yangoon wrote:
> depend
Done.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode20
scenario_simple.rst:20: No other modules are expected.
On 2010年10月18日 14:31:25, yangoon wrote:
> required.
I put No other modules are required or expected.
I wanted to say, that this script is solely for testing www.tryton.org.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode23
scenario_simple.rst:23: business procedures. Tests are restricted to successful
try
On 2010年10月18日 14:31:25, yangoon wrote:
> are restricted to test the success...
Done.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode24
scenario_simple.rst:24: out given functionalities and beating user level errors
and
On 2010年10月18日 14:31:25, yangoon wrote:
> and defeat user level errors...
Done.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode28
scenario_simple.rst:28: Business level tests should be usefull to detect
regressions in main
On 2010年10月18日 14:31:25, yangoon wrote:
> useful
Done.
http://codereview.appspot.com/2550042/diff/3001/scenario_simple.rst#newcode507
scenario_simple.rst:507: >>> (supplier_tax,) = Tax.find([
On 2010年10月18日 14:29:06, pheller wrote:
> You've already defined supplier_tax and customer_tax at lines 481 and 485... 
do
> you need to do it again?
Yes, for the moment we need to use an object only once ina a one2many or
many2many. See
http://www.tryton.org/~irclog/2010-10-18.log.html#t2010-10-18_22:31 
Sign in to reply to this message.
udono
15 years, 2 months ago (2010年10月19日 08:49:08 UTC) #8
Sign in to reply to this message.
udono
15 years, 2 months ago (2010年10月19日 09:32:19 UTC) #9
Sign in to reply to this message.
udono
15 years, 2 months ago (2010年10月21日 10:11:12 UTC) #10
Sign in to reply to this message.
udono
On 2010年10月18日 14:52:18, bch wrote: > Haven't you any traceback when the invoice creation fail ...
15 years, 2 months ago (2010年10月21日 19:34:03 UTC) #11
On 2010年10月18日 14:52:18, bch wrote:
> Haven't you any traceback when the invoice creation fail ?
All is ok now. Invoice is created.
Sign in to reply to this message.
udono
On 2010年10月18日 15:45:21, udono wrote: > On 2010年10月18日 14:29:06, pheller wrote: > > Once you're ...
15 years, 2 months ago (2010年10月21日 19:36:06 UTC) #12
On 2010年10月18日 15:45:21, udono wrote:
> On 2010年10月18日 14:29:06, pheller wrote:
> > Once you're finished with the technical review, I'm happy to proofread and
> edit
> > the prose for grammatical correctness, if you wish.
This would be great! But maybe wait a little bit, since the general idea is
still unclear.
Sign in to reply to this message.
Paul J Stevens
> This would be great! But maybe wait a little bit, since the general idea ...
15 years, 2 months ago (2010年10月21日 20:08:12 UTC) #13
> This would be great! But maybe wait a little bit, since the general idea is
> still unclear.
I love this shit!
- fully automated client testing, plus: 
- the best documentation of the programming model I've seen to date.
muchas gracias!
Sign in to reply to this message.
yangoon
15 years ago (2010年12月31日 12:38:57 UTC) #14
Sign in to reply to this message.
|
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /