def test_GT_1318_Point_Parser(self):

        with app.test_request_context(BAD_URL,
                                      data=INCORRECT_ARGS,
                                      method='PUT'):
            with self.assertRaises(BadRequest):
                args = PointResourceParsers.parsePutParameters()

        with app.test_request_context(URL, data=CORRECT_ARGS, method='PUT'):
            args = PointResourceParsers.parsePutParameters()
            self.assertEqual(args[_LAT], LAT)
            self.assertEqual(args[_JSON], JSON)
            self.assertEqual(args[_LON], LON)
            self.assertEqual(args[_ALT], ALT)
    def test_GT_1318_Point_Parser(self):

        with app.test_request_context(
                BAD_URL,
                data=INCORRECT_ARGS,
                method='PUT'
        ):
            with self.assertRaises(BadRequest):
                args = PointResourceParsers.parsePutParameters()

        with app.test_request_context(URL, data=CORRECT_ARGS, method='PUT'):
            args = PointResourceParsers.parsePutParameters()
            self.assertEqual(args[_LAT], LAT)
            self.assertEqual(args[_JSON], JSON)
            self.assertEqual(args[_LON], LON)
            self.assertEqual(args[_ALT], ALT)
Exemple #3
0
 def put(self, serviceName, pointId):
     args = PointResourceParsers.parsePutParameters()
     updatePoint(serviceName, pointId, args)
     return {}, 200
Exemple #4
0
 def put(self, serviceName, pointId):
     args = PointResourceParsers.parsePutParameters()
     updatePoint(serviceName, pointId, args)
     return {}, 200