def testUpdateChannel(self):
     collection = getDbObject(DB)[COLLECTION]
     obj_id = collection.save({NAME: 'test_GT_1292'})
     with self.assertRaises(ChannelDoesNotExist):
         updateChannel('testservice', '111', 'test', None, None)
     updateChannel('testservice', obj_id, 'test', 1, 2)
     obj = collection.find_one({ID: obj_id})
     self.assertEqual(obj['name'], 'test')
     self.assertEqual(obj['json'], 1)
     self.assertEqual(obj['acl'], 2)
 def testUpdateChannel(self):
     collection = getDbObject(DB)[COLLECTION]
     obj_id = collection.save({NAME: 'test_GT_1292'})
     with self.assertRaises(ChannelDoesNotExist):
         updateChannel('testservice', '111', 'test', None, None)
     updateChannel('testservice', obj_id, 'test', 1, 2)
     obj = collection.find_one({ID: obj_id})
     self.assertEqual(obj['name'], 'test')
     self.assertEqual(obj['json'], 1)
     self.assertEqual(obj['acl'], 2)
Exemplo n.º 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
Exemplo n.º 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