self.server_thread.daemon = True
self.server_thread.start()
- def test_do_GET_day(self):
- """Test /day response."""
+ def test_do_GET(self):
+ """Test /day and /calendar response codes."""
conn = HTTPConnection(*self.httpd.server_address)
conn.request('GET', '/day')
self.assertEqual(conn.getresponse().status, 200)
self.assertEqual(conn.getresponse().status, 200)
conn.request('GET', '/day?date=FOO')
self.assertEqual(conn.getresponse().status, 400)
+ conn.request('GET', '/calendar')
+ self.assertEqual(conn.getresponse().status, 200)
def tearDown(self):
self.httpd.shutdown()