Exemple #1
0
 def _handleModifyCommand(self, payload):
     return AlloyData.modifyCommand(**payload)
Exemple #2
0
print 100*'-' + '\n', 'TEST: AlloyData.getCategories()'
print AlloyData.getCategories()

print 100*'-' + '\n', 'TEST: AlloyData.deleteCategory()'
deletedCategory = AlloyData.deleteCategory(modifiedCategory['id'])
print deletedCategory

print 100*'-' + '\n', 'TEST: AlloyData.createCommand()'
newCommand = AlloyData.createCommand(categories[0]['id'], 1)
print newCommand

print 100*'-' + '\n', 'TEST: AlloyData.modifyCommand()'
modifiedCommand = AlloyData.modifyCommand(
    newCommand['id'],
    label=u'Modified Command',
    script=u'test me out\nsome more.',
    language=u'mel'
)
print modifiedCommand

print 100*'-' + '\n', 'TEST: AlloyData.getCommandData()'
commandData = AlloyData.getCommandData(modifiedCommand['id'])
print commandData

print 100*'-' + '\n', 'TEST: AlloyData.getCommands()'
print AlloyData.getCommands(categories[0]['id'])

print 100*'-' + '\n', 'TEST: AlloyData.deleteCommand()'
deletedCommand = AlloyData.deleteCommand(modifiedCommand['id'])
print deletedCommand