Tag archives: unittest

RSS feed of unittest

50 tips to maintain a Django reusable app

Published Jan. 2, 2018 in Deployment, Development, Tests and quality, Documentation, Web - Last update on Jan. 2, 2018.

I love Django, not just because it on top of Python, but more because it keeps its philosophy: All Zen of Python is respected with batteries included. The Ponies' framework has basically most tools and mechanisms a WebDev would want to have as such authentication, ORM multi-DB or template engine. But where Django becomes definitively ...

Continue reading

subprocess.Popen aped

Published July 30, 2016 in Development, Tests and quality - Last update on July 30, 2016.

Lately, I worked on Django DBBackup, I was remaking the database command system: classes allowing launching of backup or restore commands through subprocess.Popen. There was no unit tests and major part of them are based on command line but contrary to what I though mock out Popen took me a some time.

Continue reading

My tox environment

Published Nov. 7, 2015 in Tests and quality - Last update on Nov. 18, 2015.

I have long refused to use tox in my Python projects, I though to test code against multiple version Python was a task which should be made by CI tools. After contribute to several projects, I learned to appreciate it when I want to test code with different aspects. I was wrong and for me ...

Continue reading

Unittest and reusable app

Published July 19, 2015 in Development - Last update on July 18, 2015.

You had fun, you wrote a Django third app. You should have write unittests before but you didn't know where to place them. For my case when I wrote Django Admin CLI I used the work made in Django Comments, let's explain it a little.

All testing code are stored in tests/ directory ...

Continue reading