mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Removed old & unusable test
This commit is contained in:
parent
8308890329
commit
67073b43c1
@ -33,7 +33,8 @@
|
||||
|
||||
from uds.core.util.State import State
|
||||
from uds.models import Group as dbGroup
|
||||
from Group import Group
|
||||
from Group import Group
|
||||
import inspect
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -132,7 +133,7 @@ class GroupsManager(object):
|
||||
Returns nothing, it changes the groups this groups contains attributes,
|
||||
so they reflect the known groups that are considered valid.
|
||||
'''
|
||||
if type(groupName) is tuple or type(groupName) is list:
|
||||
if type(groupName) is tuple or type(groupName) is list or inspect.isgenerator(groupName):
|
||||
for n in groupName:
|
||||
self.validate(n)
|
||||
else:
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2013 Virtual Cable S.L.
|
||||
# Copyright (c) 2012 Virtual Cable S.L.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -31,3 +31,8 @@
|
||||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
'''
|
||||
|
||||
from django.conf.urls.defaults import patterns, include
|
||||
|
||||
urlpatterns = patterns(__package__,
|
||||
(r'^guacamole/(?P<tunnelId>.+)$', 'views.guacamole'),
|
||||
)
|
||||
|
@ -31,3 +31,19 @@
|
||||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
'''
|
||||
|
||||
from django.http import HttpResponseNotAllowed, HttpResponse
|
||||
from uds.core.util.Cache import Cache
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# We will use the cache to "hold" the tickets valid for users
|
||||
|
||||
def guacamole(request, tunnelId):
|
||||
logger.debug('Received credentials request for tunnel id {0}'.format(tunnelId))
|
||||
|
||||
cache = Cache("guacamole")
|
||||
|
||||
response = 'protocol\trdp\rhostname\tw7adolfo\rusername\tadmin\rpassword\ttemporal'
|
||||
|
||||
return HttpResponse(response, content_type='text/plain')
|
||||
|
@ -39,7 +39,6 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
# We will use the cache to "hold" the tickets valid for users
|
||||
|
||||
# Create your views here.
|
||||
def pam(request):
|
||||
response = ''
|
||||
cache = Cache('pam')
|
||||
|
@ -1,66 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012 Virtual Cable S.L.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
'''
|
||||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
'''
|
||||
|
||||
"""
|
||||
This file demonstrates writing tests using the unittest module. These will pass
|
||||
when you run "manage.py test".
|
||||
|
||||
Replace this with more appropriate tests for your application.
|
||||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
from uds.xmlrpc.util.TestTransport import rpcServer
|
||||
from uds.xmlrpc.ServiceProviders import *
|
||||
from models import *
|
||||
|
||||
class XmlRpcTest(TestCase):
|
||||
def setUp(self):
|
||||
#self.Provider1 = ServiceProviders.objects.create(name="Dummy 1", type="DummyProvider")
|
||||
#self.Provider2 = ServiceProviders.objects.create(name="Dummy 2", type="DummyProvider")
|
||||
return
|
||||
|
||||
def testProviders(self):
|
||||
"""
|
||||
Test the services providers api
|
||||
"""
|
||||
credentials = rpcServer.login('','','')
|
||||
credentials = credentials['credentials']
|
||||
#rpcServer.createServiceProvider('prueba', '', r['type'], result )
|
||||
data = [ { 'name' : 'host' ,'value' : '192.168.0.15' },
|
||||
{ 'name' : 'port' ,'value' : '443' },
|
||||
{ 'name' : 'username' ,'value' : 'admin' },
|
||||
{ 'name' : 'password' ,'value' : 'temporal' },
|
||||
]
|
||||
rpcServer.testServiceProvider(credentials, 'VmwareVCServiceProvider', data)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user