Beispiel #1
0
 def _handleDeleteCategory(self, payload):
     return AlloyData.deleteCategory(**payload)
Beispiel #2
0
commands = AlloyData.getCommands(categories[0])
print commands

print 100*'-' + '\n', 'TEST: AlloyData.createCategory()'
newCategory = AlloyData.createCategory(u'Test Category')
print newCategory

print 100*'-' + '\n', 'TEST: AlloyData.modifyCategory()'
modifiedCategory = AlloyData.modifyCategory(newCategory['id'], label=u'Mod Category')
print modifiedCategory

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