How to Test Your Django App with Selenium and pytest

In this article I will show you how to test a Django app with pytest and Selenium. We will test our CodeChalleng.es platform comparing the logged out homepage vs the logged in dashboard. We will navigate the DOM matching elements and more. Overall you should learn enough Selenium and pytest to start testing a web page including a login. Sounds exciting? Let’s dive straight in!

All You Need to Know to Start Using Fixtures in Your pytest Code

Setting up test cases for code that manage data can be challenging but it’s an important skill to reliably test your code. You might have heard of the setup and teardown methods in unittest. In pytest you use fixtures and as you will discover in this article they are actually not that hard to set up. Fixtures have been labelled pytest’s killer feature so let’s explore them in this article using a practical example.

Code Challenge 42 – Mastering Regular Expressions

Hi Pythonistas, it’s beginning of the month so we’re busy selecting some cool code challenges for you to work on to hone your Python skills. Regular Expressions was a long time coming so let’s get it out there. We hope we hit a decent intermediate level with this challenge. If you have questions ask us in the comments or join our Slack.