All Questions
11 questions
2
votes
0
answers
49
views
Google Mailer app inside Django using OAuth 2.0
I have built this Django Package which is an alternative for sending mail to users using Gmail API. Everything is working fine. But the verify(self, request) method inside ...
2
votes
1
answer
3k
views
Test django URLs
I started learning Django and now I want to write some tests for my application. After reading some blog posts and watching youtube tutorials I wrote tests for URLs. Look at below.
urls.py
...
3
votes
0
answers
46
views
Command Line Utility for Starting Django Projects and Apps with Custom Files
What I'm Doing
I'm writing a command line utility for starting Django projects and apps with custom files.
The custom files build upon what Django offers, to make sure things like a custom auth user ...
8
votes
1
answer
823
views
TDD tests for every view and its permissions in a REST API
I am currently developing a Django Rest Framework API with TDD. I have 15 tests and counting for two views, which doesn't seem right to me. It takes me a lot of time to write the tests and a lot of ...
15
votes
2
answers
290
views
Building Slack message
I have the function which builds and return Slack message with text and attachments. How can I refactor this function to make it ...
2
votes
1
answer
220
views
Unit tests for os.scandir/scantree a directory
I wrote my first series of test for this simple function:
...
8
votes
1
answer
3k
views
Django shopping cart, and testing
For an e-commerce web application I have written a shopping cart, and some tests for it.
I have used a course on Lynda.com, on building an e-commerce website, as inspiration on how to build the ...
3
votes
0
answers
2k
views
Testing a Django password reset procedure
I am writing tests for the password reset flow. It involves emails, links to reset the password etc so I made a really long test.
It is testing quite a lot of things.
If I break up the tests then the ...
4
votes
1
answer
671
views
TDD Django - Shopping Cart
I'm new in Python TDD and I would like to ask you about some feedback for Django unit testing.
...
5
votes
2
answers
236
views
Test Driven Development with Django
I'm learning TDD with Django and currently I'm testing my CreateView class. I feel like I'm not using best practices but am not sure on how to improve my code.
...
3
votes
1
answer
2k
views
Using mocking to test that a Django view renders as expected
I have a Django view that ends with this...
return render(request, 'define/see_all.html', context)
I have mocked the render function and
...