I was reading a technical blog post, and the post subtitle is: assert_called_once: Threat or Menace

I do not understood what the writer wanted to express with this synonyms. I mean, is there a popular (regional) joke with this words or just a pun?

And there is difference or particular in use of them?

  • 3
    I'd never heard of this, but google brings up this wikipedia article: en.wikipedia.org/wiki/Threat_or_menace
    – Sarah
    Jan 27, 2016 at 18:31
  • 1
    It's a "nerd-talk" :)
    – InitK
    Jan 27, 2016 at 20:02
  • 1
    @Sarah post research as an answer ;-) Jan 28, 2016 at 0:13
  • I wouldn't have picked up on that either, but Sarah got it, it's clearly meant as humor. Jan 30, 2016 at 1:52
  • 1
    @MauroBaraldi If you have found a satisfactory answer to your question, please mark it as answered so people looking for truly unanswered questions will not waste their time.
    – Peter
    Feb 8, 2016 at 9:39

1 Answer 1


It looks like you got this from a blog on Python unit testing here

The problem with the test seems to be that the test will pass when in reality it should not

The blog is about Test Driven Development where the test suite is used to ensure the underlying code is doing what it's supposed to do. TDD is more a feature of Ruby and Rails and is becoming more adapted for Python.

The fact that the title was named Threat or Menace is the directed towards the test itself:


when the actual test is supposed to be


which is the method supplied by Python Mock Library for server testing (in this case). However, the misspelling can still cause the test to pass even though there is a typo.

Which is not the best thing to happen

These oddities can happen when monkey patching is involved which seems to be the case.

[NB: I am not a Python person]

  • To have an answer from 2 doubts, from different categories, in only one post. Thank you Stack Exchange for make it possible! Feb 3, 2016 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .