import unittest
import sys
sys.path.append('roomfinder_web/roomfinder_web')
import web_server

class FlaskTestCase(unittest.TestCase):

    def setUp(self):
        sys.stderr.write('Setup testing.')
        web_server.app.config['TESTING'] = True
        self.app = web_server.app.test_client()
 
    def test_correct_http_response(self):
        sys.stderr.write('Test HTTP GET / == 200.')
        resp = self.app.get('/')
        self.assertEquals(resp.status_code, 200)
    def test_about_correct_http_response(self):
        sys.stderr.write('Test HTTP GET /about == 200.')
        resp = self.app.get('/about')
        self.assertEquals(resp.status_code, 200)
    def test_form_correct_http_response(self):
        sys.stderr.write('Test HTTP GET /form == 200.')
        resp = self.app.get('/form')
        self.assertEquals(resp.status_code, 200)

    def test_false_correct_http_response(self):
        sys.stderr.write('Test HTTP GET /false == 200.')
        resp = self.app.get('/false')
        self.assertEquals(resp.status_code, 200)

    # def test_correct_content(self):
    #     resp = self.app.get('/hello/world')
    #     self.assertEquals(resp.data, '"Hello World!"\n')

    # def test_universe_correct_content(self):
    #     resp = self.app.get('/hello/universe')
    #     self.assertEquals(resp.data, '"Hello Universe!"\n')

    def tearDown(self):
        pass

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

@@ -241,16 +241,59 @@
  = True%0A
+        web_server.data_server=sys.argv%5B1%5D%0A
         
@@ -896,201 +896,8 @@
 0)%0A%0A
-    def test_false_correct_http_response(self):%0A        sys.stderr.write('Test HTTP GET /false == 200.')%0A        resp = self.app.get('/false')%0A        self.assertEquals(resp.status_code, 200)%0A%0A
     

add data_server param in testing.py and fix false ko test