Пример #1
0
    def test_GT_1291_Channel_Parser(self):

        with app.test_request_context(URL, data=CORRECT_ARGS, method='PUT'):
            args = ChannelResourceParser.parsePutParameters()
            self.assertEqual(args[_NAME], NAME)
            self.assertEqual(args[_JSON], JSON)
            self.assertEqual(args[_ACL], ACL)

        with app.test_request_context(URL, data=INCORRECT_ARGS, method='PUT'):
            with self.assertRaises(BadRequest):
                args = ChannelResourceParser.parsePutParameters()
Пример #2
0
    def test_GT_1291_Channel_Parser(self):

        with app.test_request_context(URL, data=CORRECT_ARGS, method='PUT'):
            args = ChannelResourceParser.parsePutParameters()
            self.assertEqual(args[_NAME], NAME)
            self.assertEqual(args[_JSON], JSON)
            self.assertEqual(args[_ACL], ACL)

        with app.test_request_context(URL, data=INCORRECT_ARGS, method='PUT'):
            with self.assertRaises(BadRequest):
                args = ChannelResourceParser.parsePutParameters()
Пример #3
0
 def put(self, serviceName, channelId):
     listArgs = ChannelResourceParser.parsePutParameters()
     updateChannel(serviceName, channelId, listArgs.get(ARGS_NAME),
                   listArgs.get(ARGS_JSON), listArgs.get(ARGS_ACL))
     return {}, 200
Пример #4
0
 def put(self, serviceName, channelId):
     listArgs = ChannelResourceParser.parsePutParameters()
     updateChannel(serviceName, channelId, listArgs.get(
         ARGS_NAME), listArgs.get(ARGS_JSON), listArgs.get(ARGS_ACL))
     return {}, 200