I set up my main project at work to utilize LocalStack this week. I wasn't able to get it working using a virtual environment with Python, but another project at work has it set up through Docker. A coworker that is much more familiar with Docker than I am helped …
-
-
Mocking in Python tests
For a while now, I've felt unsure about mocking in Python. It has helped me test in the past, but I've also seen a lot of smart people talk or write about its pitfalls.
Recently, I had to test some functionality around calls to Twilio, so I decided to investigate …
-
Django Tasks - Cronjobs vs Celery
Like my previous vs post, this isn't a showdown. Instead, this post is about matching the solution to the problem. The tl;dr is that Celery is great at what it does, but it requires more infrastructure and setup than I needed to solve my problem.
The Problem to Solve …
-
ramblr
In writing for this blog, there are some posts I'd like to write that I don't think quite fit the theme of this blog. For example, I want to write short book reviews to link to from my books page, but I don't want them showing up on the index …
-
Keyboards
I
recently* read Timo Zimmermann's post about buying a 'keyboard to last' and it made me realize I haven't posted about my keyboard journey yet. If you don't know much about mechanical keyboards, Brett Cannon's post about deciding on a new keyboard has a lot of great info. It also … -
[TIL] Using Fixtures with pytest `parametrize`
For longer than I care to admit, I was running my end to end tests in only Firefox. I thought it would be trivial to add a fixture to have my tests run using multiple browsers. Unfortunately, there isn't an easy way in
pytest
to use fixtures as parametrized values … -
Setting up pre-commit to work with WSL and Fork on Windows
For the tl;dr instructions, feel free to skip to the last two paragraphs.
Years ago, I used SourceTree for visualizing my git graph. At some point, SourceTree became bloated and I really didn't like the direction it went, so I looked around for alternatives. I forget if I settled …
-
[TIL] Mocking Chained Calls
At work last week, I was asked to write tests for code that reaches out to Twilio's verify service. Here is what that code looks like (from the Twilio docs):
client = Client(account_sid, auth_token) verification = client.verify \ .v2 \ .services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \ .verifications \ .create(to='+15017122661', channel='sms')
I was able to …
-
Strategies for a Long Running Side Project
At DjangoConUS 2023, I gave a lighting talk with this title. It was a lot of fun, and I'd suggest you try to give a lightning talk if you haven't before. It's a great way to try giving a talk at a conference without having to commit to a full …