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)
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)
def setUp(self): self.app = app.test_client()