[CentralOH] Monthly Meeting THIS Monday (10/24)

Eric Floehr eric at intellovations.com
Sun Oct 23 15:27:53 EDT 2016


Don't forget that because Halloween falls on the last Monday of the month,
we've moved our monthly meeting AHEAD one week to this Monday, October 24.

RSVP Here:

Also don't forget the Python Challenge this month was to make up a Python
Challenge that YOU would do.

For our main feature, Brian Costlow will be talking about "Fun with Mass
Production: Using Test Factories instead of Static Fixtures"

Here is the description of the talk:

Creating fixture objects for testing doesn't seem hard. But that date field
that was once a date in the future is now in the past. And you had to add a
field to a Django Model to meet new business requirements. And suddenly
those fixtures seem rather brittle.

You can use mocks, but that doesn't work well if the object's methods are
what's under test. And using them incorrectly can cover up subtle problems.

The solution is to use factories to create test objects dynamically. But
writing good factory functions for a test suite is hard. Trying to
introspect classes and create objects with valid values can add a lot of
tricky, hard-to-maintain code to your test suite. It seems like you're
trading one problem for another.

But the heavy lifting has already been done for you. Factory Boy and Model
Mommy are object factory libraries. Hypothesis is a property based testing
library. All three can be used to dynamically create valid test objects for
your unit and integration testing.

This talk provides a brief introduction to all three libraries, and
demonstrates how they can be used to make your tests more robust and
complete, while the test code itself becomes simpler.

See you there!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20161023/c17542cb/attachment.html>

More information about the CentralOH mailing list