service.upnext icon indicating copy to clipboard operation
service.upnext copied to clipboard

Add unit tests

Open dagwieers opened this issue 6 years ago • 3 comments

While I initially thought unit testing would be easy, I now have to conclude it is not that simple :roll_eyes:

dagwieers avatar Oct 23 '19 02:10 dagwieers

Basic encoding unit tests have been added in #93

dagwieers avatar Nov 26 '19 15:11 dagwieers

@dagwieers The Travis build is failing with an issue with Python 3.5. This is what I could see in the logs

` Traceback (most recent call last): File "/home/travis/build/im85288/service.upnext/test/test_encoding.py", line 71, in test_to_addon_signals decoded_data = AddonSignals._decodeData('["%s"]' % encoded_data) # pylint: disable=protected-access File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/AddonSignals.py", line 21, in _decodeData return json.loads(base64.b64decode(data[0])) File "/opt/python/3.5.6/lib/python3.5/json/init.py", line 312, in loads s.class.name)) TypeError: the JSON object must be str, not 'bytes

`

Hopefully you have access to the Travis results? https://travis-ci.org/im85288/service.upnext/builds/617623308?utm_medium=notification&utm_source=email

im85288 avatar Nov 27 '19 09:11 im85288

Our unit tests are failing for a genuine bug in Addon Signals: ruuk/script.module.addon.signals#6

We are also waiting for ruuk/script.module.addon.signals#4 to be merged so we can use the upstream master branch, rather than my branch.

dagwieers avatar Nov 27 '19 09:11 dagwieers