#!/usr/bin/env python3

import unittest
import http.client

url = "localhost:8000"

class Client:
	def test_Connect(self):
		connected = 0
		try:
			self.conn = http.client.HTTPConnection(url)
			self.conn.connect()
			connected = 1
		except Exception:
			print(Exception)

		return connected
			
	def test_Close(self):
		self.conn.close()
		return 1

class TestServer(unittest.TestCase):
	def test_Scenario1(self):
		cli = Client()
		for i in range(10):
			self.assertEqual(cli.test_Connect(), 1)
			self.assertEqual(cli.test_Close(), 1)

if __name__ == "__main__":
	unittest.main()

@@ -285,16 +285,136 @@
 onnected
+%0A%0A%09def test_RequstIndex(self):%0A%09%09res = None%0A%09%09self.conn.request(%22GET%22, %22/%22)%0A%09%09res = self.conn.getresponse()%0A%09%09return res
 %0A%09%09%09%0A%09de
@@ -653,16 +653,327 @@
 (), 1)%0A%0A
+%09def test_Scenario2(self):%0A%09%09for i in range(10):%0A%09%09%09cli = Client()%0A%09%09%09self.assertEqual(cli.test_Connect(), 1)%0A%09%09%09res = cli.test_RequstIndex()%0A%09%09%09self.assertIsNotNone(res)%0A%09%09%09self.assertEqual(res.status, 200)%0A%09%09%09self.assertEqual(res.read(22), b%22%3Chtml%3E%3Cbody%3EHello!%3Cbr%3E%22)%0A%09%09%09self.assertEqual(cli.test_Close(), 1)%0A%0A
 if __nam

Add request index page test.