Skip to content

test_login fails and directory structure incorrectly setup #1

Description

@angusb

I encounter this error after running tests.py (on a freshly checked out master branch):

[master] angusb@~/Desktop/pyfoo: python tests.py

.............E............

ERROR: test_login (main.TestLogin)

Traceback (most recent call last):
File "tests.py", line 243, in test_login
api = PyfooAPI(email="email", password="password", integration_key="integration_key")
File "/Users/angusb/Desktop/pyfoo/pyfoo.py", line 238, in init
response = self.make_call(url, data, 'POST')
File "/Users/angusb/Desktop/pyfoo/pyfoo.py", line 258, in make_call
response = opener.open(request)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 400, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 513, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 438, in error
return self._call_chain(_args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(_args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 521, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: You must provide both a email and password, and integration key to continue.


Ran 26 tests in 1.921s

FAILED (errors=1)

Furthermore, if I run from one directory higher - python pyfoo/tests.py all tests fail. It seems as if the scripts directory is found relative to where the current directory is. This seems like a mistake - or is this intentional?

Thanks.

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