Exemplo n.º 1
0
    def no_test_setcapabilities(self):
        server = 'http://demo.opencastproject.org'
        user = '******';
        password = '******';
        client_name = 'rubenrua_pr'
        client_address = '172.20.209.225'

        client = MHHTTPClient(server, user, password)
        client.hostname = client_name
        client.address = client_address
        
        out = parseString(client.setconfiguration({}))
        for item  in out.getElementsByTagName('item'):
            if item.getAttribute('key') == 'service.pid':
                self.assertEqual(item.firstChild.firstChild.wholeText, 'galicaster')
Exemplo n.º 2
0
    def no_test_setcapabilities(self):
        server = 'http://demo.opencastproject.org'
        user = '******'
        password = '******'
        client_name = 'rubenrua_pr'
        client_address = '172.20.209.225'

        client = MHHTTPClient(server, user, password)
        client.hostname = client_name
        client.address = client_address
        
        out = parseString(client.setconfiguration({}))
        for item  in out.getElementsByTagName('item'):
            if item.getAttribute('key') == 'service.pid':
                self.assertEqual(item.firstChild.firstChild.wholeText, 'galicaster')
Exemplo n.º 3
0
    def no_test_setstate(self):
        server = 'http://demo.opencastproject.org'
        user = '******';
        password = '******';
        client_name = 'rubenrua_pr'
        client_address = '172.20.209.225'
        client_states = [ 'shutting_down', 'capturing', 'uploading', 'unknown', 'idle' ]        

        client = MHHTTPClient(server, user, password)
        client.hostname = client_name
        client.address = client_address
        
        for state in client_states:
            a = client.setstate(state)
            self.assertEqual(a, '{0} set to {1}'.format(client_name, state))
Exemplo n.º 4
0
    def no_test_setstate(self):
        server = 'http://demo.opencastproject.org'
        user = '******'
        password = '******'
        client_name = 'rubenrua_pr'
        client_address = '172.20.209.225'
        client_states = [ 'shutting_down', 'capturing', 'uploading', 'unknown', 'idle' ]        

        client = MHHTTPClient(server, user, password)
        client.hostname = client_name
        client.address = client_address
        
        for state in client_states:
            a = client.setstate(state)
            self.assertEqual(a, '{0} set to {1}'.format(client_name, state))