def testing_calculate_square(self):
     tester = app.test_client(self)
     response = tester.get('/getsquare')
     self.assertTrue(b'perimeter' in response.data)
 def test_response1(self):
     tester = app.test_client(self)
     response = tester.get('/')
     statuscode = response.status_code
     self.assertEqual(statuscode, 200)
 def testing_calculate_circle(self):
     tester = app.test_client(self)
     response = tester.get('/getcircle')
     self.assertTrue(b'circumference' in response.data)
 def testing_home_page(self):
     tester = app.test_client(self)
     response = tester.get('/')
     self.assertTrue(b'Hello' in response.data)
 def test_content_length(self):
     tester = app.test_client(self)
     response = tester.get('/io')
     temp = json.loads(response.data)['measurements']
     self.assertGreater(len(temp), 0, msg='Not Populated')
 def test_content_data(self):
     tester = app.test_client(self)
     response = tester.get('/io')
     self.assertTrue(b'shape' in response.data)
 def test_content_type(self):
     tester = app.test_client(self)
     response = tester.get('/io')
     print(response.content_type)
     self.assertEqual(response.content_type, 'application/json')