!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_xupdate.py (1.91 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
from Ft.Xml.Lib import TreeCompare

#From the spec

src_1 = """\
<?xml version="1.0"?>
<addresses version="1.0">

  <address id="1">
    <fullname>Andreas Laux</fullname>
    <born day='1' month='12' year='1978'/>
    <town>Leipzig</town>
    <country>Germany</country>
  </address>

</addresses>
"""

xu_1 = """\
<?xml version="1.0"?>
<xupdate:modifications
  version="1.0"
  xmlns:xupdate="http://www.xmldb.org/xupdate"
>

  <xupdate:insert-after select="/addresses/address[1]" >

    <xupdate:element name="address">
      <xupdate:attribute name="id">2</xupdate:attribute>
      <fullname>Lars Martin</fullname>
      <born day='2' month='12' year='1974'/>
      <town>Leizig</town>
      <country>Germany</country>
    </xupdate:element>
  </xupdate:insert-after>

</xupdate:modifications>
"""

expected_1 = """<?xml version='1.0' encoding='UTF-8'?><addresses version='1.0'>\n\n  <address id='1'>\n    <fullname>Andreas Laux</fullname>\n    <born day='1' year='1978' month='12'/>\n    <town>Leipzig</town>\n    <country>Germany</country>\n  </address><address id='2'><fullname>Lars Martin</fullname><born day='2' year='1974' month='12'/><town>Leizig</town><country>Germany</country></address>\n\n</addresses>"""

#etc

import test_helper

def test_update(tester):

    tester.startTest("XUpdate")

    repo = test_helper.GetRepo(tester)

    doc = repo.fetchResource("/test/doc1")

    doc.xUpdate(xu_1)

    tester.compare(expected_1, doc.getContent(), diff=1,
                   func=TreeCompare.TreeCompare)

    repo.txRollback()

    tester.testDone()
    return

def cleanup(tester):

    tester.startTest("Clean Up")
    repo = test_helper.GetRepo(tester)
    if repo.hasResource('/test'):
        t = repo.fetchResource('/test')
        t.delete()
    test = repo.createContainer("/test",1)
    test.createDocument('doc1',src_1)
    repo.txCommit()
    tester.testDone()


def Test(tester):

    cleanup(tester)
    test_update(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.0037 ]--