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 …
-
-
[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 …
-
Using SQLite for a Django application on fly.io
I'd like to run a few small apps I've been developing for learning purposes (to do list, etc.) on a cheap or free platform as a service (PaaS) provider so I don't have to worry about a full deployment setup like I have on my main project. These projects aren't …
-
Moving from Django Microframework to Django
At DjangoConUS 2019, Carlton Gibson gave a talk called Using Django as a Micro-Framework, where he demonstrated a single file implementation of "Hello, World!" in Django.
At the sprints during DjangoConUS 2023, Paolo Melchiorre showed off an even more minimal version that sparked some great discussion. Specifically, the usage of …
-
Testing Stripe Integration in Django
I have been using Stripe to process payments for my company AstroVenture (see more context in a previous post here) for a couple of years now, and it has worked great. One thing that took me quite a while to figure out was how to test that we were properly …
-
Lessons Learned Teaching Undergraduate Astronomy with a Video Game - Testing
This is the fourth and final installment of the series breaking down my talk from DjangoConUS 2022. The first entry covered background information about the project, the second was about using Django Rest Framework, and the third was about infrastructure and deployment.
Before diving in, I'd like to emphasize that …
-
Lessons Learned Teaching Undergraduate Astronomy with a Video Game - Infrastructure and Deployment
This is the third installment of the series breaking down my talk from DjangoConUS 2022. The first entry covered background information about the project and the second was about using Django Rest Framework.
First, some important context: if you are a devops engineer, or have a lot of experience with …
-
Lessons Learned Teaching Undergraduate Astronomy with a Video Game - Django vs Django Rest Framework (DRF)
If you've ended up here from somewhere outside of this blog, and are looking for an exhaustive comparison of these two libraries, I regret to inform you, this isn't that. If you're here for the next installment of the series breaking down my talk from DjangoConUS 2022, welcome back!
This …