Staffjoy / suite

Staffjoy V1, aka "Suite" - a scheduling application for hundreds of workers
https://www.staffjoy.com
Other
842 stars 231 forks source link

Unirest in throws errors in smoke tests #3

Open philipithomas opened 7 years ago

philipithomas commented 7 years ago
Traceback (most recent call last):
  File "/opt/python/2.7.12/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/opt/python/2.7.12/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/unirest/__init__.py", line 82, in __request
    encoded_string = base64.b64encode(user + ':' + password)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
philipithomas commented 7 years ago

See https://travis-ci.org/Staffjoy/suite/builds/205335397

isaacm commented 7 years ago

I think this error is caused by sending events to intercom.io here.

If no tracking needs to happen during testing, then checking current_app.config.get("ENV") in ["dev", "test"] here should prevent the call to intercom.io API while running smoke tests.