OMG!!! - I wish I had seen that function sooner thanks for the tip


On Tue, Sep 3, 2013 at 10:48 AM, Michael Maurizi
<notifications@github.com>wrote:

> In opentreemap/treemap/tests/udfs.py:
>
> > +                 {'action': 'prune',
> > +                  'height': 12}]
> > +
> > +        self.plot.udfs['Stewardship'] = stews
> > +
> > +        self.plot.save_with_user(self.commander_user)
> > +
> > +        reloaded_plot = Plot.objects.get(pk=self.plot.pk)
> > +
> > +        new_stews = reloaded_plot.udfs['Stewardship']
> > +
> > +        for stew in new_stews:
> > +            # An 'id' param should be stamped in here
> > +            self.assertIn('id', stew)
> > +
> > +            # But delete it for easy testing
>
> Instead of deleting elements, consider using self.assertDictContainsSubset
> [
> http://docs.python.org/2/library/unittest.html#unittest.TestCase.assertDictContainsSubset
> ]
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/azavea/OTM2/pull/268/files#r6127577>
> .
>



-- 
Adam Hinz
Software Engineer, Azavea
hinz.adam@gmail.com | c: 608-445-8391 | Twitter: @ahinz