[SIP SIMPLE client] openxcap test suite

Juha Heinanen jh at tutpro.com
Fri Dec 10 16:31:41 CET 2010


i didn't find any mailing list related to openxcap, so i'm posting here
instead of opening a ticket (in case i have made some trivial mistake).

i namely run openxcap test program test.py and got lots of failures and
errors (see below).  regarding test_users_auth failures, i turned on
mysql query logging and didn't see any auth related queries that could
have failed.

is current version of test.py supposed to work?  if yes, i go back and
try harder.

-- juha

/usr/src/openxcap/xcap/test$ ./test.py 
test_global_auth (test_auth.AuthTest_org_openmobilealliance_pres_rules) ... ok
test_users_auth (test_auth.AuthTest_org_openmobilealliance_pres_rules) ... FAIL
test_global_auth (test_auth.AuthTest_pidf_manipulation) ... ok
test_users_auth (test_auth.AuthTest_pidf_manipulation) ... FAIL
test_global_auth (test_auth.AuthTest_pres_rules) ... ok
test_users_auth (test_auth.AuthTest_pres_rules) ... FAIL
test_global_auth (test_auth.AuthTest_resource_lists) ... ok
test_users_auth (test_auth.AuthTest_resource_lists) ... FAIL
test_global_auth (test_auth.AuthTest_rls_services) ... ok
test_users_auth (test_auth.AuthTest_rls_services) ... FAIL
test_global_auth (test_auth.AuthTest_test_app) ... ok
test_users_auth (test_auth.AuthTest_test_app) ... FAIL
test_global_auth (test_auth.AuthTest_watchers) ... ok
test_users_auth (test_auth.AuthTest_watchers) ... FAIL
test_global_auth (test_auth.AuthTest_xcap_caps) ... ok
test_users_auth (test_auth.AuthTest_xcap_caps) ... FAIL
test_schema (test_xcap_caps.XCAPCaps) ... ok
test_ns_bindings (test_nsbindings.NSBindingsTest) ... ok
test_conditional_GET (test_etags.ETagTest) ... ok
test_conditional_PUT (test_etags.ETagTest) ... ok
test_conditional_GET (test_etags.ETagTest2) ... ok
test_conditional_PUT (test_etags.ETagTest2) ... ok
test_etag_parsing (test_etags.ETagTest2) ... ok
test400_1 (test_errors.ErrorsTest) ... ok
test400_2 (test_errors.ErrorsTest) ... ok
test404 (test_errors.ErrorsTest) ... ok
test405 (test_errors.ErrorsTest) ... ok
test409 (test_errors.ErrorsTest) ... ok
test_gibberish (test_errors.ErrorsTest) ... ok
test_has_global (test_global.TestGlobal) ... ok
test_no_global (test_global.TestGlobal) ... ok
Testing different ways of inserting an element as described in examples from Section 8.2.3 ... ok
Testing PUT requests of form '*[@att="some"]' which require looking into body of PUT ... ok
test_replacement (test_element_put.PutElementTest) ... ok
test_operations1 (test_resourcelists.DocumentTest) ... FAIL
test_operations2 (test_resourcelists.DocumentTest) ... FAIL
test_operations3 (test_resourcelists.DocumentTest) ... ok
test_operations4 (test_resourcelists.DocumentTest) ... ERROR
test_delete (test_attribute.AttributeTest) ... FAIL
test_get (test_attribute.AttributeTest) ... FAIL
test_put (test_attribute.AttributeTest) ... FAIL
test_pidf_manipulation (test_presrules.PresenceRulesTest) ... Dec 10 17:28:01 sip openxcap[2703]: Starting factory <twisted.web.xmlrpc._QueryFactory instance at 0xa2f91cc>
Dec 10 17:28:01 sip openxcap[2703]: Stopping factory <twisted.web.xmlrpc._QueryFactory instance at 0xa2f91cc>
Dec 10 17:28:01 sip openxcap[2703]: Starting factory <twisted.web.xmlrpc._QueryFactory instance at 0xa1eab6c>
Dec 10 17:28:01 sip openxcap[2703]: Stopping factory <twisted.web.xmlrpc._QueryFactory instance at 0xa1eab6c>
Dec 10 17:28:01 sip openxcap[2703]: Starting factory <twisted.web.xmlrpc._QueryFactory instance at 0xa2f2bac>
Dec 10 17:28:01 sip openxcap[2703]: Stopping factory <twisted.web.xmlrpc._QueryFactory instance at 0xa2f2bac>
ok
test_delete (test_element.ElementTest) ... FAIL
test_get (test_element.ElementTest) ... FAIL
test_put_error (test_element.ElementTest) ... FAIL
test_pidf_manipulation (test_pidf.PIDFTest) ... Dec 10 17:28:02 sip openxcap[2703]: Starting factory <twisted.web.xmlrpc._QueryFactory instance at 0xa28188c>
Dec 10 17:28:02 sip openxcap[2703]: Stopping factory <twisted.web.xmlrpc._QueryFactory instance at 0xa28188c>
Dec 10 17:28:02 sip openxcap[2703]: Starting factory <twisted.web.xmlrpc._QueryFactory instance at 0xa28124c>
Dec 10 17:28:02 sip openxcap[2703]: Stopping factory <twisted.web.xmlrpc._QueryFactory instance at 0xa28124c>
Dec 10 17:28:02 sip openxcap[2703]: Starting factory <twisted.web.xmlrpc._QueryFactory instance at 0xa2edf2c>
Dec 10 17:28:02 sip openxcap[2703]: Stopping factory <twisted.web.xmlrpc._QueryFactory instance at 0xa2edf2c>
ok
test_operations1 (test_rlsservices.DocumentTest) ... ok
test_operations2 (test_rlsservices.DocumentTest) ... ok
test_operations3 (test_rlsservices.DocumentTest) ... ok
test_operations4 (test_rlsservices.DocumentTest) ... ok
test_errors (test_fragment.FragmentTest) ... ok
test_success (test_fragment.FragmentTest) ... ok
test_get (test_watchers.Test) ... ok

======================================================================
ERROR: test_operations4 (test_resourcelists.DocumentTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_resourcelists.py", line 122, in test_operations4
    [name] = etree.fromstring(resource_lists_xml_non_unique_list).xpath(field[0])
IndexError: list index out of range

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_org_openmobilealliance_pres_rules)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (404) not in [401]

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_pidf_manipulation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (404) not in [401]

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_pres_rules)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (404) not in [401]

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_resource_lists)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (200) not in [401]

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_rls_services)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (404) not in [401]

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_test_app)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (200) not in [401]

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_watchers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (404) not in [401]

======================================================================
FAIL: test_users_auth (test_auth.AuthTest_xcap_caps)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_auth.py", line 15, in test_users_auth
    self.get(self.app, status=[401])
  File "/usr/src/openxcap/xcap/test/common.py", line 151, in get
    self.assertStatus(r, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (404) not in [401]

======================================================================
FAIL: test_operations1 (test_resourcelists.DocumentTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_resourcelists.py", line 107, in test_operations1
    'application/resource-lists+xml')
  File "/usr/src/openxcap/xcap/test/common.py", line 212, in getputdelete
    self.put(application, document, status=201, content_type_in_GET=content_type, client=client)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 80, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) != 201

======================================================================
FAIL: test_operations2 (test_resourcelists.DocumentTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_resourcelists.py", line 111, in test_operations2
    'application/resource-lists+xml')
  File "/usr/src/openxcap/xcap/test/common.py", line 212, in getputdelete
    self.put(application, document, status=201, content_type_in_GET=content_type, client=client)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 80, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) != 201

======================================================================
FAIL: test_delete (test_attribute.AttributeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_attribute.py", line 47, in test_delete
    self.put('resource-lists', resource_list_xml)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) not in [200, 201]

======================================================================
FAIL: test_get (test_attribute.AttributeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_attribute.py", line 27, in test_get
    self.put('resource-lists', resource_list_xml)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) not in [200, 201]

======================================================================
FAIL: test_put (test_attribute.AttributeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_attribute.py", line 56, in test_put
    self.put('resource-lists', resource_list_xml)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) not in [200, 201]

======================================================================
FAIL: test_delete (test_element.ElementTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_element.py", line 70, in test_delete
    self.put('resource-lists', xml)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) not in [200, 201]

======================================================================
FAIL: test_get (test_element.ElementTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_element.py", line 45, in test_get
    self.put('resource-lists', xml)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) not in [200, 201]

======================================================================
FAIL: test_put_error (test_element.ElementTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/openxcap/xcap/test/test_element.py", line 96, in test_put_error
    self.put('resource-lists', xml)
  File "/usr/src/openxcap/xcap/test/common.py", line 165, in put
    self.assertStatus(r_put, status)
  File "/usr/src/openxcap/xcap/test/common.py", line 86, in assertStatus
    raise self.failureException(msg)
AssertionError: Status (409) not in [200, 201]

----------------------------------------------------------------------
Ran 53 tests in 9.874s

FAILED (failures=16, errors=1)





More information about the SIPBeyondVoIP mailing list