pycloudinary icon indicating copy to clipboard operation
pycloudinary copied to clipboard

Migrate test suite to pytest

Open ThexXTURBOXx opened this issue 1 year ago • 9 comments

Taken from #367

It might be worth considering to migrate to pytest in the near future as suggested here. The changes should only be rather minimal, but it might be tricky to simultaneously get Python 2.7 and 3.x working.

ThexXTURBOXx avatar Oct 09 '23 19:10 ThexXTURBOXx

@ThexXTURBOXx , that's a great idea!

const-cloudinary avatar Oct 09 '23 21:10 const-cloudinary

May I work on this ?

kurayami07734 avatar Oct 16 '23 13:10 kurayami07734

@kurayami07734 , sure

const-cloudinary avatar Oct 16 '23 14:10 const-cloudinary

I looked at the docs for pytest They require python 3.7+

kurayami07734 avatar Oct 18 '23 17:10 kurayami07734

@kurayami07734 Older versions of pytest work for Python 2.7 and older 3.x releases: https://docs.pytest.org/en/6.2.x/py27-py34-deprecation.html

ThexXTURBOXx avatar Oct 18 '23 18:10 ThexXTURBOXx

I'm getting this error when trying to run the test_config.py test after editing it for pytest screenshot-2023-10-20_21:37:03

kurayami07734 avatar Oct 20 '23 16:10 kurayami07734

The test suite should be runnable through tox, I would guess

ThexXTURBOXx avatar Oct 20 '23 16:10 ThexXTURBOXx

where in the test_archive.py file is the api_key set?

kurayami07734 avatar Oct 25 '23 17:10 kurayami07734

Hi @kurayami07734

You can set the configuration as mentioned in the documentation here: https://cloudinary.com/documentation/django_integration#configuration

Please let me know if you have further questions.

Best Regards, Sree

skalahasti-cloudinary avatar Oct 25 '23 20:10 skalahasti-cloudinary