kpi-web-guild / django-girls-blog-DrEdi

MIT License
0 stars 0 forks source link

[DRAFT] unit tests (page object etc.) #17

Closed webknjaz closed 7 years ago

webknjaz commented 7 years ago

TBA

DrEdi commented 7 years ago

Great explanation about unittests(Examples on Python 2.7) http://www.drdobbs.com/testing/unit-testing-with-python/240165163

DrEdi commented 7 years ago

Testing in Django. As for me this is the best one I've read. There are 3 links under text https://docs.djangoproject.com/en/1.10/topics/testing/

DrEdi commented 7 years ago

So, as I've seen the best tutorials about testing in django is in django docs. Perhaps somewhere are better, but for beginning it's enough. I'd also recommend to download full version of django-docs in PDF - as for me it's much more comfortable as reading from web version(as above)

webknjaz commented 7 years ago

Identify the endpoints and functions you are going to test and list them here.

DrEdi commented 7 years ago

So, for the first time that would be great to test models. After I wanna move to views. We have many different and I think it gets some time to test all of them(get, post, rendering and redirecting). That's all. I intentionally missed testing DB. I think we must move to other topics. BUT, I'd like to learn this when we'll examine SQLAlchemy. What do you think?

webknjaz commented 7 years ago

There's no SQLAlchemy inside of django by default. It's shipped w/ Django ORM out of the box :) Other than that the plan sounds good.

DrEdi commented 7 years ago

Lol, I know) It's even not connected to web(but I've heard that flask use it) But that would be great to examine this

webknjaz commented 7 years ago

flask doesn't have it's own ORM (neither most of other frameworks do)