mail:/opt/mlmmjadmin/tests@[15:18] # bash main.sh
========================================================= test session starts ==========================================================
platform freebsd11 -- Python 2.7.15, pytest-3.4.2, py-1.5.3, pluggy-0.6.0
rootdir: /opt/mlmmjadmin-1.1/tests, inifile:
collected 6 items
test-mlmmj.py F
=============================================================== FAILURES ===============================================================
_________________________________________________________ test_invalid_domain __________________________________________________________
def test_invalid_domain():
url = data.url_ml_in_not_exist_domain
> _json = get(url=url)
test-mlmmj.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
__init__.py:13: in get
return r.json()
/usr/local/lib/python2.7/site-packages/requests/models.py:892: in json
return complexjson.loads(self.text, **kwargs)
/usr/local/lib/python2.7/json/__init__.py:339: in loads
return _default_decoder.decode(s)
/usr/local/lib/python2.7/json/decoder.py:364: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x806d3dfd0>, s = 'Internal Server Error', idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` or ``unicode``
beginning with a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration:
> raise ValueError("No JSON object could be decoded")
E ValueError: No JSON object could be decoded
/usr/local/lib/python2.7/json/decoder.py:382: ValueError
======================================================= 1 failed in 0.63 seconds =======================================================
* Clean up temporary files.