!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/4Suite/tests/Server/Server/SCore/   drwxr-xr-x
Free 4.93 GB of 27.03 GB (18.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_server.py (4.73 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |


from Ft.Server.Common import ResourceTypes, ValidationInfo, Schema

import test_helper

from Ft.Server.Server import FtServerServerException, Error

from Ft.Server import FTSERVER_NAMESPACE

from Ft.Xml.XLink import XLINK_NAMESPACE

def test_create(tester):


    tester.startTest("Create Server Document")

    #Create XML Document
    repo = test_helper.GetRepo(tester)
    test = repo.fetchResource('/test')
    doc = test.createDocument('server',SERVER1,forcedType=ResourceTypes.ResourceType.SERVER)


    dMd = doc.getMetaDataResource().getContent()
    dContent = doc.getContent()

    cd,md = test_helper.TestMetaData(tester,
                                     dMd,
                                     'server',
                                     ResourceTypes.ResourceType.SERVER,
                                     [],
                                     tester.test_data['userName'],
                                     'text/xml',
                                     str(len(dContent)),
                                     [],
                                     )

    tester.compare(SERVER1,dContent)

    test_helper.TestServerRdf(tester,
                              repo,
                              '/test/server',
                              len(dContent),
                              tester.test_data['userName'],
                              cd,
                              md,
                              Schema.NULL_DOCDEF,
                              'foo',
                              'Ft.Server.Server.FtRpc.FtRpcHandler',
                              1,
                              )




    repo.txCommit()

    tester.testDone()
    return


def test_state(tester):


    tester.startTest("Change Server State")

    repo = test_helper.GetRepo(tester)
    test = repo.fetchResource('/test')
    doc = test.fetchResource('server')

    doc.setStopped()
    
    dMd = doc.getMetaDataResource().getContent()
    dContent = doc.getContent()

    cd,md = test_helper.TestMetaData(tester,
                                     dMd,
                                     'server',
                                     ResourceTypes.ResourceType.SERVER,
                                     [],
                                     tester.test_data['userName'],
                                     'text/xml',
                                     str(len(dContent)),
                                     [],
                                     )

    test_helper.TestServerRdf(tester,
                              repo,
                              '/test/server',
                              len(dContent),
                              tester.test_data['userName'],
                              cd,
                              md,
                              Schema.NULL_DOCDEF,
                              'foo',
                              'Ft.Server.Server.FtRpc.FtRpcHandler',
                              0,
                              )



    doc.setRunning()
    
    dMd = doc.getMetaDataResource().getContent()
    dContent = doc.getContent()

    cd,md = test_helper.TestMetaData(tester,
                                     dMd,
                                     'server',
                                     ResourceTypes.ResourceType.SERVER,
                                     [],
                                     tester.test_data['userName'],
                                     'text/xml',
                                     str(len(dContent)),
                                     [],
                                     )

    test_helper.TestServerRdf(tester,
                              repo,
                              '/test/server',
                              len(dContent),
                              tester.test_data['userName'],
                              cd,
                              md,
                              Schema.NULL_DOCDEF,
                              'foo',
                              'Ft.Server.Server.FtRpc.FtRpcHandler',
                              1,
                              )



    repo.txCommit()

    tester.testDone()
    return



def cleanup(tester):

    tester.startTest("Clean Up")
    repo = test_helper.GetRepo(tester)
    if repo.hasResource('/test'):
        repo.deleteResource('/test')
    repo.createContainer("/test",1)
    repo.txCommit()
    tester.testDone()



SERVER1="""<ftss:Server xmlns:ftss="%s" xmlns:dc="%s" name='foo'>
  <dc:Description>This is a test server</dc:Description>
  <ftss:Port>8080</ftss:Port>
  <ftss:Handler>Ft.Server.Server.FtRpc.FtRpcHandler</ftss:Handler>
  <ftss:Status running='1'/>
</ftss:Server>
""" % (FTSERVER_NAMESPACE,Schema.DC)




def Test(tester):

    cleanup(tester)
    test_create(tester)
    test_state(tester)



:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0035 ]--