Added test to make sure index (/) will render correctly (to prevent #484)

This commit is contained in:
Steffen Schröder
2018-07-06 22:08:43 +02:00
parent 4c267df3d9
commit 4db88dfa55
+4
View File
@@ -114,6 +114,10 @@ class HttpbinTestCase(unittest.TestCase):
httpbin.app.debug = True
self.app = httpbin.app.test_client()
def test_index(self):
response = self.app.get('/', headers={'User-Agent': 'test'})
self.assertEqual(response.status_code, 200)
def get_data(self, response):
if 'get_data' in dir(response):
return response.get_data()