addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

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

  • A former member
    A former member

    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):

    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

  • The Factory

    A great place to work remotely, hold meetings, and learn new skills

  • PyImageSearch

    Computer vision and OpenCV learning materials

  • O'Reilly

    Discounts on print books, ebooks, and conferences.

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