def search_message_action(self, environ, start_response): print "searchaction" print environ['wsgi.input'] form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) text = form['text'].value searchlist = meeplib.search_message_dict(text) headers = [('Content-type', 'text/html')] headers.append(('Location', '/m/search')) start_response("302 Found", headers) return ["message deleted"]
def search_message_action(self, environ, start_response): print "searchaction" print environ['wsgi.input'] form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) text=form['text'].value searchlist=meeplib.search_message_dict(text) headers = [('Content-type', 'text/html')] headers.append(('Location', '/m/search')) start_response("302 Found", headers) return ["message deleted"]
def test_search(self): x = meeplib.search_message_dict("content") assert len(x) == 1