Changeset 174
- Timestamp:
- 08/21/08 16:51:42 (3 months ago)
- Files:
-
- trunk/microfacts/controllers/thread.py (modified) (1 diff)
- trunk/microfacts/templates/thread/layout.html (modified) (1 diff)
- trunk/microfacts/tests/functional/test_thread.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/microfacts/controllers/thread.py
r169 r174 24 24 25 25 def search(self, id=''): 26 # TODO 27 # request_data = dict(**request.params) 28 # mode = RegisterSearch('/thread', request_data).execute() 29 mode = RegisterSearch('/thread').execute() 26 request_data = dict(request.params) 27 mode = RegisterSearch('/thread', request_data).execute() 30 28 if mode.response_code == 200: 31 29 c.threads = mode.entities trunk/microfacts/templates/thread/layout.html
r169 r174 38 38 ${select('aside')} 39 39 ${select('*[local-name()!="aside"]|text()')} 40 <script type="text/javascript" charset="utf-8"> 41 var payloadThread = ${c.thread_as_json}; 42 var payloadThreadFactlets = ${c.thread_factlets_json}; 43 </script> 40 41 <script type="text/javascript" charset="utf-8"> 42 var payloadThread = ${c.thread_as_json}<py:if test="not c.thread_as_json">null</py:if>; 43 var payloadThreadFactlets = ${c.thread_factlets_json}<py:if test="not c.thread_factlets_as_json">null</py:if>; 44 45 </script> 44 46 45 47 </body> trunk/microfacts/tests/functional/test_thread.py
r163 r174 36 36 assert 'There are ' + str(len(threads)) + ' threads' in response 37 37 assert 'browse the thread list' in response 38 assert 'var payloadThread = null;' in response 38 39 39 40 def test_list(self): … … 50 51 assert 'Battles in the Napoleonic Wars' not in response 51 52 assert 'Battles in the Napoleonic Wars 2' not in response 53 54 def test_search_2(self): 55 path = url_for(controller='thread', action='search', q='title: 2') 56 response = self.app.get(path) 57 print response 58 assert 'Battles in the Napoleonic Wars 2' in response 59 assert 'Battles in the Napoleonic Wars</a>' not in response 52 60 53 61 def test_read(self):
