Add content-length header to http resonses

This commit is contained in:
Paulus Schoutsen 2016-03-12 23:41:00 -08:00
parent 7d23a5f7e4
commit f8d2da2ace
2 changed files with 9 additions and 4 deletions

View file

@ -104,6 +104,8 @@ class TestAPI(unittest.TestCase):
_url(const.URL_API_STATES_ENTITY.format("test.test")),
headers=HA_HEADERS)
self.assertEqual(req.headers['content-length'], str(len(req.content)))
data = ha.State.from_dict(req.json())
state = hass.states.get("test.test")