Closed steemnd closed 6 years ago
Traceback (most recent call last):
File "/home/hyd3l/Workspace/python-tarallo/venv/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/hyd3l/Workspace/python-tarallo/venv/lib/python3.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/hyd3l/Workspace/python-tarallo/venv/lib/python3.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/hyd3l/Workspace/python-tarallo/venv/lib/python3.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python3.7/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.7/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/hyd3l/Workspace/python-tarallo/test.py", line 19, in <module>
tarallo.tsession.login()
File "/home/hyd3l/Workspace/python-tarallo/tarallo.py", line 46, in login
res = requests.post(TARALLO_URL + '/v1/session', data=json.dumps(body), headers=headers)
NameError: name 'TARALLO_URL' is not defined
EDIT:
Just use self.url
instead of the global variable
Just fix this by creating a global constant so called and set this equal to
os.environ['TARALLO_URL']