Django Unit Test with Patch and MagicMock Example


Ever had a child that asked, “Why?” to every answer you give. It could have started with your statement, “Children should do what their parents tell them to do.” If you try to answer each “Why?” thoroughly, you must psychoanalyze each answer until eventually you’re describing the meaning of the Universe. If that’s what is seems like when learning python’s “from unittest.mock patch, MagicMock”, you’ve come to the right place.

In this article I’m going to unravel the mystery of patch and MagicMock. If at first it seems you need the meaning of the Universe to get it, don’t worry, it’s not that hard. Once I got over this hurdle, writing unit_tests has become second nature. Read on and you can finally know “Why”.

Read moreDjango Unit Test with Patch and MagicMock Example

Agile Scrum, Part 6, Sprint Length


In the previous article, we discuss the Sprint and how to perform it on a day to day basis.

This this article, we’ll talk about Sprint length. Should it be one week or two weeks?

With short sprints, 1 or 2 weeks, teams are able to adapt to change easily, in the transitions between sprints. We keep the sprint sacred; we’re inflexible during Sprint time, and then very flexible in each transition. The shorter the Sprint, the more adaptable to change. Longer sprints means less time doing ceremonies, so theoretically can get more work done, but then less adaptable to change.

Read moreAgile Scrum, Part 6, Sprint Length

Agile Scrum, Part 4, Story Sizing


In the previous article, you’ll find a definition of the Epics, Stories and Tasks, plus how the fit into the Backlog and Sprints.

This article will focus on story sizing. The main points are:

  • Use the Fibonacci sequence: 1, 2, 3, 5, 8, 13, 21
  • SM and Contributors vote to quickly size stories
  • Relative sizing in a fun social game is as effective as in depth analysis, in a fraction of the time.

Read moreAgile Scrum, Part 4, Story Sizing

Pingdom Site Uptime and Performance Monitoring, now RUM is getting really good at their trade. For uptime and response time monitoring, Pingdom is a quick win for any size website. Does a great job, and Pingdom has racked up some big name customers, touted on their home page, like Microsoft, Dell, Disney, Google, Apple and many more. Everyone is using Pingdom, they have an easy to learn API so everything can be automated, the pricing is a great value, from 1 site to hundreds of sites. My only complaint is the lack of beacon out alerting. Email, SMS, Twitter, iOS, Android are adequate for a small shop with just a few folks on call, but what about the bigger shops? How about integration into Pager Duty? Pager Duty’s article explains how to do it, but it’s email based, which makes me cringe. That’s great that Page Duty has found a way to make it work, but I’d like to see Pingdom make a reverse API option, where they’ll call our API to relay the alert.

Read morePingdom Site Uptime and Performance Monitoring, now RUM