tag: html5lib

How to create a fullstack application using Django and Python Part 18
Maria D. Campbell
In this section, I create the password_reset routes, views, tests, and templates. The results of the password reset process are output to the Terminal console. I debug the password_reset_confirm_tests tests to find out what the actual csrf token is and hard code it into the test_csrf (function) test. I re-use the Beautiful Soup 4 and Soup Sieve packages to refactor the test_form_inputs (function) test.
#fullstack development, #django, #macOS, #python3, #password reset, #security, #series, #beautifulsoup4, #html5lib, #html parser, #soupsieve, #coverage.py, #test coverage, #tests, #unittest

How to create a fullstack application using Django and Python Part 16
Maria D. Campbell
In this section, I demonstrate an alternative to the original test_form_inputs test in which we used the .assertContains() method to verify the existence of specific inputs residing in the signup form. I install Beautiful Soup 4 and Soup Sieve along with the html5lib HTML parser, and then re-create the test_form_inputs test using those packages. The test is much shorter, and my approach to discovering the ids of the inputs I want to grab by inspecting the signup form element in the browser is quicker and much easier to read!
#fullstack development, #macOS, #django, #beautifulsoup4, #soupsieve, #html5lib, #html parser, #python3, #series, #tests, #unittest