Latest Posts

Django Testing: Dynamically Accessing Attributes in Unit Tests

In this blog post, we’ll explore a way to write unit tests for a Django model using Model Mommy. Our main focus is on the update_dog_from_data function, which updates a Dog object with JSON data. However, the highlight is the technique to dynamically access attribute values in the tested object. By the end, you’ll learn some unit testing strategies and gain insights into dynamically interacting with object attributes during testing.

TIL: time travel with Python’s standard library

There are a few different approaches for writing tests for date and/or time-sensitive functionality.

One could choose to add a sleep() in the test, which would guarantee that the time passed, but that also has the downside of increasing the run time of the test.

Book review: The Programmer’s Brain

As a software developer, I usually self-refer as a “Professional learner” and this book’s subtitle ("What every programmer needs to know about cognition") caught my eye right away.

Newer Posts