Mocking Real-World Code

After three useless presentations about Mock, featuring ridiculously unhelpful examples about classes with methods that do basic arithmetic which everything except a 1st generation Intel Pentium could do correctly, Adam Tauno Williams finally gets it [thanks to a PyOhio 2013 presentation].

The rumors are true - Mock is melon farming AWESOME. Adam will demonstrate how to use Mock to write tests for code that does wild and crazy things like reference other objects, use a database connection, send e-mail, and the basic kinds of things you need to know how to fake in a unittest. This is not an expert level presentation on Mock, but a HOWTO by someone [Adam] still new enough to Mock to remember the parts that aren't obvious [hopefully someday when he's a 36th level Mage he'll look at those arithmetic examples and think to himself: "Wow, from that it is all so obvious; what is wrong with those idjits?"].

Jace Browning will follow that up by talking about his technique for mixing unittests (with mock) and integration tests (without mock).

Join or login to comment.

  • Jamie B.

    Mock sounds shockingly useful, but unfortunately it utterly fails against MongoKit because of the ... odd ways MongoKit handles things.

    September 17, 2013

  • Matt B.

    The side effects freak me out a little, but mock is shockingly useful, and lots of good information was shared.

    September 17, 2013

  • Jace B.

    Mixing Unit Tests (mock) with Integration Tests (no mock): http://nbviewer.ipython.org/6587691

    September 16, 2013

  • Dave B.

    I'll be happy to throw in my 2c as needed too. I mock stuff a lot :)

    September 10, 2013

  • Jace B.

    If you need to fill any more time I could talk about my current technique for mixing unit tests (using mock) with integration tests (not using mock).

    August 27, 2013

    • Ben R.

      That sounds like a great compliment to the topic. Thanks!

      August 28, 2013

15 went

Our Sponsors

Imagine having a community behind you

Get started Learn more
Rafaël

We just grab a coffee and speak French. Some people have been coming every week for months... it creates a kind of warmth to the group.

Rafaël, started French Conversation Group

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy