sjkingo / python-freshdesk

An API for the Freshdesk helpdesk
BSD 2-Clause "Simplified" License
86 stars 67 forks source link

Feat/solutions #66

Closed xtof2all closed 4 years ago

xtof2all commented 4 years ago

Adding the feature the get solution categories, solution folders and articles. It is also possible to retrieve them in another language. For now, this is only the list/get operation.

I have directly added some test cases as well

sjkingo commented 4 years ago

Hi, it looks like you've changed the permissions on test.sh from 755 to 644, making it unexecutable by Travis. Could you please fix and force push? Thanks!

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.7%) to 93.266% when pulling a8c70f90e5c3ce8fed8fa949634e12bb258424df on xtof2all:feat/solutions into 2276adf980aa0163c23dba255034605d11d7dca2 on sjkingo:master.

xtof2all commented 4 years ago

Strangely, the test fail, while they were okay locally. It seems to be a problem with the encoding as I'm testing for accented characters in the translation. I will first test with by specify encoding as described in [https://www.python.org/dev/peps/pep-0263/]. If this does not work, I will eliminate the accents in the tests.

xtof2all commented 4 years ago

@coveralls It seems that the tests for the python2.7 were failing. Finally, I could solve it by explicitly setting the literals in test_solutions.py to be unicode.

sjkingo commented 4 years ago

@coveralls It seems that the tests for the python2.7 were failing. Finally, I could solve it by explicitly setting the literals in test_solutions.py to be unicode.

I'm wondering if a better solution is to keep them as string literals (no u prefix), but add this to the top:

from __future__ import unicode_literals

Do you want to try that?

xtof2all commented 4 years ago

@sjkingo Good idea! I have adapted the code such that it uses the future package for the test_solutions.py

xtof2all commented 4 years ago

Can you verify whether the approach with the unicode_literal from the future package the correct one?

sjkingo commented 4 years ago

Thanks, this looks great! I'll release on pypi later today.