Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15480)

Issue 2214046: Unit Tests for ModelSQL read method and update to test module

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by sharoonthomas
Modified:
13 years, 2 months ago
Reviewers:
bch, yangoon, yangoon1, udono, ced
Visibility:
Public.

Description

I have added tests and there are 4 tests which fail. The reasons have been tagged with FIXME in the test file The tests have a coverage of 96.15% of the read method. The unhandled cases are: Lines 590-596 (Will never reach there because function field spec does not allow the use of datetime_field by design. So no use in read method) Line 657, Line 660 - Need to enter invalid model_name in reference field, Line 663 - Need to enter illegal_id in reference field Line 687 - Need to enter model_name in reference field, Line 690 - Need to enter illegal_id in reference field

Patch Set 1 #

Total comments: 60

Patch Set 2 : Changes adviced by cedk #

Total comments: 20

Patch Set 3 : All object lookups moved to setup, uses assertEqual and assertFalse instead of pythonic comparison #

Total comments: 1

Patch Set 4 : Added the tests missed in the previous push #

Total comments: 6

Patch Set 5 : Added tests for language and fixed issue pointed by cedk #

Patch Set 6 : Fixed a line which had more than 80 chars #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+559 lines, -0 lines) Patch
M trytond/test/__init__.py View 1 chunk +1 line, -0 lines 0 comments Download
A trytond/test/model_sql.py View 1 2 3 4 5 1 chunk +111 lines, -0 lines 3 comments Download
A trytond/tests/test_modelsql.py View 1 2 3 4 1 chunk +447 lines, -0 lines 0 comments Download

Messages

Total messages: 18
ced
http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py File trytond/test/model_sql.py (right): http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py#newcode8 trytond/test/model_sql.py:8: class SQLModel(ModelSQL): Name the models with Read inside because ...
13 years, 7 months ago (2010-09-25 08:04:28 UTC) #1
ced
http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py File trytond/test/model_sql.py (right): http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py#newcode70 trytond/test/model_sql.py:70: (' %s' % table) You must group by something.
13 years, 7 months ago (2010-09-25 10:07:20 UTC) #2
ced
http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py File trytond/test/model_sql.py (right): http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py#newcode70 trytond/test/model_sql.py:70: (' %s' % table) On 2010/09/25 10:07:20, ced wrote: ...
13 years, 7 months ago (2010-09-25 10:08:30 UTC) #3
sharoonthomas
http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py File trytond/test/model_sql.py (right): http://codereview.appspot.com/2214046/diff/1/trytond/test/model_sql.py#newcode8 trytond/test/model_sql.py:8: class SQLModel(ModelSQL): On 2010/09/25 08:04:28, ced wrote: > Name ...
13 years, 7 months ago (2010-09-25 11:02:10 UTC) #4
sharoonthomas
13 years, 7 months ago (2010-09-25 11:03:58 UTC) #5
ced
http://codereview.appspot.com/2214046/diff/8001/trytond/test/model_sql.py File trytond/test/model_sql.py (right): http://codereview.appspot.com/2214046/diff/8001/trytond/test/model_sql.py#newcode51 trytond/test/model_sql.py:51: class SQLReadModelHistory(ModelSQL): No more used http://codereview.appspot.com/2214046/diff/8001/trytond/test/model_sql.py#newcode66 trytond/test/model_sql.py:66: 'MIN(COALESCE("%s".write_date, "%s".create_date)) ...
13 years, 7 months ago (2010-09-25 11:31:23 UTC) #6
sharoonthomas
Updated code will follow http://codereview.appspot.com/2214046/diff/8001/trytond/test/model_sql.py File trytond/test/model_sql.py (right): http://codereview.appspot.com/2214046/diff/8001/trytond/test/model_sql.py#newcode51 trytond/test/model_sql.py:51: class SQLReadModelHistory(ModelSQL): On 2010/09/25 11:31:24, ...
13 years, 7 months ago (2010-09-25 12:05:14 UTC) #7
sharoonthomas
13 years, 7 months ago (2010-09-25 12:06:13 UTC) #8
ced
http://codereview.appspot.com/2214046/diff/14001/trytond/tests/test_modelsql.py File trytond/tests/test_modelsql.py (right): http://codereview.appspot.com/2214046/diff/14001/trytond/tests/test_modelsql.py#newcode283 trytond/tests/test_modelsql.py:283: read_data = self.sql_model_history.read(ids) check the read data
13 years, 7 months ago (2010-09-25 12:17:27 UTC) #9
sharoonthomas
13 years, 7 months ago (2010-09-25 12:33:19 UTC) #10
ced
http://codereview.appspot.com/2214046/diff/6002/trytond/tests/test_modelsql.py File trytond/tests/test_modelsql.py (right): http://codereview.appspot.com/2214046/diff/6002/trytond/tests/test_modelsql.py#newcode270 trytond/tests/test_modelsql.py:270: transaction.cursor.execute(select_query) In fact, here you only test create and ...
13 years, 7 months ago (2010-09-25 12:49:29 UTC) #11
sharoonthomas
Please suggest http://codereview.appspot.com/2214046/diff/6002/trytond/tests/test_modelsql.py File trytond/tests/test_modelsql.py (right): http://codereview.appspot.com/2214046/diff/6002/trytond/tests/test_modelsql.py#newcode270 trytond/tests/test_modelsql.py:270: transaction.cursor.execute(select_query) On 2010/09/25 12:49:29, ced wrote: > ...
13 years, 7 months ago (2010-09-25 12:52:25 UTC) #12
ced
http://codereview.appspot.com/2214046/diff/6002/trytond/tests/test_modelsql.py File trytond/tests/test_modelsql.py (right): http://codereview.appspot.com/2214046/diff/6002/trytond/tests/test_modelsql.py#newcode270 trytond/tests/test_modelsql.py:270: transaction.cursor.execute(select_query) On 2010/09/25 12:52:25, sharoonthomas wrote: > On 2010/09/25 ...
13 years, 7 months ago (2010-09-25 13:26:17 UTC) #13
sharoonthomas
13 years, 6 months ago (2010-09-25 22:05:59 UTC) #14
sharoonthomas
13 years, 6 months ago (2010-09-25 22:17:57 UTC) #15
yangoon1
http://codereview.appspot.com/2214046/diff/8003/trytond/test/model_sql.py File trytond/test/model_sql.py (right): http://codereview.appspot.com/2214046/diff/8003/trytond/test/model_sql.py#newcode5 trytond/test/model_sql.py:5: "Test Models for testing Model SQL" "Test Models for ...
13 years, 6 months ago (2010-09-26 19:09:21 UTC) #16
yangoon
13 years, 3 months ago (2010-12-31 12:40:40 UTC) #17
udono
13 years, 2 months ago (2011-01-31 15:29:27 UTC) #18

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b