~unity-2d-team/unity-2d/Shell-MultiMonitor

« back to all changes in this revision

Viewing changes to grackle/tests/test_client.py

  • Committer: William Grant
  • Date: 2012-01-22 12:35:09 UTC
  • Revision ID: william.grant@canonical.com-20120122123509-hh1m5nc5sv718t2o
Fix batching to almost work backwards too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    HTTPServer,
3
3
    BaseHTTPRequestHandler,
4
4
    )
 
5
import httplib
5
6
import os
6
7
from signal import SIGKILL
7
8
from StringIO import StringIO
35
36
    def do_POST(self):
36
37
        message = self.rfile.read(int(self.headers['content-length']))
37
38
        if message == 'This is a message':
38
 
            self.send_response(200)
 
39
            self.send_response(httplib.CREATED)
39
40
            self.end_headers()
40
41
            self.wfile.close()
41
42
        else:
42
 
            self.send_error(400)
 
43
            self.send_error(httplib.BAD_REQUEST)
43
44
 
44
45
 
45
46
def run_service():