Exemple #1
0
 def _handleDeleteCommand(self, payload):
     return AlloyData.deleteCommand(**payload)
Exemple #2
0
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

print 100*'-' + '\n', 'FINAL STATE TESTS:'
categories = AlloyData.getCategories()
print 'CATEGORIES:', categories

for c in categories:
    print 'COMMANDS(' + c['id'] + '):', AlloyData.getCommands(c['id'])

print 'TESTS COMPLETE!'