Пример #1
0
    def testUploadModule(self):
        utils.uploadUserModule('upload1', 'dummy content')

        # Check module info
        tree = utils.callRpcCommand('modulemng get upload1')

        self.assertEquals('modules', tree.tag)
        self.assertEquals(1, len(tree))

        module = tree[0]
        self.assertEquals('module', module.tag)
        self.assertChildText(module, 'name', 'upload1')
        self.assertChildText(module, 'version', '0')
        self.assertChildText(module, 'type', 'Custom')
        self.assertChildText(module, 'upgradable', 'true')
Пример #2
0
 def setUp(self):
     utils.uploadUserModule(shellExt("xmlecho"),
                            files.executable(isWindows(), 'xmlecho'))
Пример #3
0
 def setUp(self):
     utils.uploadUserModule('remove1',
                            files.executable(isWindows(), 'xmlecho'))
Пример #4
0
    def testNotExecutable(self):
        utils.uploadUserModule('upload3',
                               files.executable(isWindows(), 'xmlecho'))

        result = utils.callRpcCommandError('upload3')
Пример #5
0
    def testReuploadModule(self):
        utils.uploadUserModule('upload1', 'dummy content')

        # uploading again should fail
        result = utils.callRpcCommandError('upload usermodule upload1',
                                           'dummy content')
Пример #6
0
 def setUp(self):
     utils.uploadUserModule('remove1',
                            files.executable(isWindows(), 'xmlecho'))