def test_case_1st_quadrant(self): pnt = point.POINT(1,1) result = point.quadrant(pnt) expected = 1 self.assertEqual(result,expected)
def test_case_3st_quadrant(self): pnt = point.POINT(-1,-1) result = point.quadrant(pnt) expected = 3 self.assertEqual(result,expected)
def test_case_on_axis(self): pnt = point.POINT(0,0) result = point.quadrant(pnt) expected = "point falls on axis." self.assertEqual(result,expected)
def get_topchars(): pnt = point.POINT(int(request.args.get("x")), int(request.args.get("y"))) return jsonify({'Quadrant': point.quadrant(pnt)})