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

Issue 7092052: Refactors search and adds some tests.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by j.c.sackett
Modified:
11 years, 3 months ago
Reviewers:
rharding, mp+143182
Visibility:
Public.

Description

Refactors search and adds some tests. Search views have been moved to their own view file. The actual search machinery has been moved into its own method, do_search, as it did essentially the same thing in both views. Tests are added using a mock for do_search and a result fake for the result type the search should return. https://code.launchpad.net/~jcsackett/charmworld/search-refactor/+merge/143182 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : Refactors search and adds some tests. #

Patch Set 3 : Refactors search and adds some tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -99 lines) Patch
[revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
charmworld/testing/__init__.py View 1 chunk +2 lines, -2 lines 0 comments Download
charmworld/views/misc.py View 2 chunks +0 lines, -97 lines 0 comments Download
charmworld/views/search.py View 1 1 chunk +83 lines, -0 lines 0 comments Download
charmworld/views/tests/test_search.py View 1 1 chunk +53 lines, -0 lines 0 comments Download

Messages

Total messages: 6
j.c.sackett
Please take a look.
11 years, 3 months ago (2013-01-14 20:45:28 UTC) #1
rharding
lgtm but with suggestions on using Mock and fixing a small UX issue around the ...
11 years, 3 months ago (2013-01-15 13:37:25 UTC) #2
j.c.sackett
https://codereview.appspot.com/7092052/diff/1/charmworld/views/search.py File charmworld/views/search.py (right): https://codereview.appspot.com/7092052/diff/1/charmworld/views/search.py#newcode38 charmworld/views/search.py:38: if not "search_text" in request.params: On 2013/01/15 13:37:26, rharding ...
11 years, 3 months ago (2013-01-15 13:43:11 UTC) #3
j.c.sackett
Please take a look.
11 years, 3 months ago (2013-01-15 15:27:25 UTC) #4
rharding
lgtm thanks for the update.
11 years, 3 months ago (2013-01-15 15:31:42 UTC) #5
j.c.sackett
11 years, 3 months ago (2013-01-15 17:14:40 UTC) #6
*** Submitted:

Refactors search and adds some tests.

Search views have been moved to their own view file.
The actual search machinery has been moved into its own method, do_search, as
it did essentially the same thing in both views.
Tests are added using a mock for do_search and a result fake for the result
type the search should return.

R=rharding
CC=
https://codereview.appspot.com/7092052
Sign in to reply to this message.

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