Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python tests are failing #7665

Closed
tommydeboer opened this issue Aug 3, 2018 · 1 comment
Closed

Python tests are failing #7665

tommydeboer opened this issue Aug 3, 2018 · 1 comment

Comments

@tommydeboer
Copy link
Collaborator

How to Reproduce

  1. Add a new group 'it'
  2. Import it_emx_datatypes
  3. Copy the Python REST test from https://github.com/molgenis/molgenis/blob/7.0/molgenis-python/src/test/python/test-rest.py and run it

Expected behavior

No test failures

Observed behavior

======================================================================
ERROR: test_login_logout_and_get_MolgenisUser (__main__.TestStringMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "rest-test.py", line 26, in test_login_logout_and_get_MolgenisUser
    response = s.get(self.user_entity)
  File "/Users/tommy/temp/molgenis.py", line 110, in get
    return response.json()["items"]
  File "/Library/Python/2.7/site-packages/requests/models.py", line 805, in json
    return complexjson.loads(self.text, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

======================================================================
FAIL: test_get_attribute_meta (__main__.TestStringMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "rest-test.py", line 123, in test_get_attribute_meta
    meta)
AssertionError: {'labelAttribute': True, 'auto': False, 'visible': True, 'readOnly': False, 'hre [truncated]... != {u'labelAttribute': True, u'isAggregatable': False, u'name': u'username', u'auto [truncated]...
Diff is 926 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_no_login_and_get_MolgenisUser (__main__.TestStringMethods)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "rest-test.py", line 37, in test_no_login_and_get_MolgenisUser
    self.assertEqual(e.response.json()['errors'][0]['message'], self.no_count_permission_user_msg)
AssertionError: u"No 'Read metadata' permission on entity type 'User' with id 'sys_sec_User'." != 'No [COUNT] permission on entity type [User] with id [sys_sec_User]'

----------------------------------------------------------------------
Ran 10 tests in 9.358s

FAILED (failures=2, errors=1)
@LuukDijkhuis LuukDijkhuis added this to the 7.0.0_musthave milestone Aug 8, 2018
@tommydeboer tommydeboer self-assigned this Aug 10, 2018
sidohaakma added a commit that referenced this issue Aug 14, 2018
Fix #7542 #7665 #7666 Python client, test and documentation fixes
@LuukDijkhuis
Copy link

done

@fdlk fdlk closed this as completed in ed5328b Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants