Skip to content

test_dataverse.py produces warning/error messages. #42

Description

@markrlondon

Can you upgrade test_dataverse.py so that it doesn't produce the following error? Thanks.

t# py.test test_dataverse.py::TestConnection::test_connect
============================= test session starts ==============================
platform linux2 -- Python 2.7.6 -- pytest-2.5.1
collected 8 items

test_dataverse.py .E

==================================== ERRORS ====================================
_______________ ERROR at teardown of TestConnection.test_connect _______________

cls = <class 'dataverse.test.test_dataverse.TestConnection'>

@classmethod
def teardown_class(cls):
    """Delete the temporary user.

        Note that this will fail if the user has any non-deleted content.
        """
    delete_url = 'https://{0}/api/admin/authenticatedUsers/{1}/'.format(
        TEST_HOST, cls.username,
    )
    resp = requests.delete(delete_url)
  assert resp.status_code == 200

E assert 503 == 200
E + where 503 = <Response [503]>.status_code

test_dataverse.py:55: AssertionError
------------------------------- Captured stderr --------------------------------
/usr/local/lib/python2.7/dist-packages/src/dataverselj/dataverse/test/test_dataverse.py:113: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
assert connection._service_document
====================== 1 passed, 1 error in 1.16 seconds =======================
root@report:/usr/local/lib/python2.7/dist-packages/src/dataverselj/dataverse/test#

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions