Testing Python AWS calls with Moto

In my previous Writing Tests For Your Python Project, I started writing tests for my Python code but then ran out of options because I had completed all tests that didn’t involve calls to the AWS API. Now we’ll begin testing Python AWS calls with Moto. You can view some additional details about Moto in their documentation. You will want to also review the list of Implemented Services in the Moto documentation to make sure you the API endpoints and methods are supported....

January 27, 2023 · 9 min · Scott

Writing Tests For Your Python Project

I began this little trip with the post Exporting CloudWatch Logs to S3 that provided example code to get logs from Cloud Watch to S3. From there, the code got prettier with Adding pre-commit Hooks to Python Repo. The next logical step is to make sure the code functions exactly like we’d expect. This can be done by writing tests to make sure our code functions like we’d expect. I’ve highlighted a number of reasons why you should create tests in the article Top 5 Reasons to Build Tests for Your Code....

January 20, 2023 · 5 min · Scott

Top 5 Reasons to Build Tests for Your Code

As a Python developer, it’s important to make sure that your code is working correctly and efficiently. One way to do this is by building tests for your code. In this blog post, we’ll go over the top reasons why you should build tests for your Python code. Improved Quality One of the main benefits of building tests for your code is that it helps improve the quality of your code....

January 13, 2023 · 2 min · Scott

5 Common Reasons To Use Pre-commit Hooks in Your Python Project

Pre-commit hooks are scripts that run automatically before a commit is made. In my post Adding pre-commit Hooks to Python Repo, I explained how to configure pre-commit hooks in your repo and address the issues identified by them. After understanding how to setup these hooks, the next question is what hooks should I use and why? Here are five common reasons to use pre-commit hooks for Python and some example plugins that you can use for each reason....

January 6, 2023 · 5 min · Scott

Successfully Deploying a Static WordPress Site

If you’ve followed my previous posts, you’ll see that I’ve spent some time attempting to build my blog on WordPress and then finally make it static. This had resulted in lots of custom code and even more failed attempts to get things to publish correctly. I’ve finally been successful in building out my site with a combination of some of my failed attempts: Adding Nginx in Front of WordPress Building a Kubernetes Container That Synchs with Private Git Repo Building a Static WordPress The third article above is the most failed attempt to date at making the WordPress site static because it resulted in just as many successes as it did failures....

November 17, 2022 · 6 min · Scott