示例#1
0
 def setUp(self):
     self.app = app.test_client()
     headers = {'Content-Type': 'application/json'}
     data = {
         "ipaddr": "172.31.216.100",
         "secure": None,
         "username": "******",
         "password": "******"
     }
     data1 = json.dumps(dict(data))
     response_login = self.app.post('http://127.0.0.1:5000/login',
                                    headers=headers,
                                    data=data1)
     self.assertEquals(response_login.data, "loged in")
     self.assertEquals(response_login.status_code, 200)
示例#2
0
 def setUp(self):
     self.app = app.test_client()
     headers = {
         'Content-Type': 'application/json'
     }
     data = {
         "ipaddr": "172.31.216.100",
         "secure": None,
         "username": "******",
         "password": "******"
     }
     data1 = json.dumps(dict(data))
     response_login = self.app.post('http://127.0.0.1:5000/login',
                                    headers=headers,
                                    data=data1)
     self.assertEquals(response_login.data, "loged in")
     self.assertEquals(response_login.status_code, 200)
示例#3
0
 def setUp(self):
     self.app = app.test_client()
示例#4
0
 def setUp(self):
     self.app = app.test_client()