Its in the docs for unittest
http://docs.python.org/2/library/unittest.html#unittest.TestCase.assertRaises

The with statement uses something called a context manager, to do some
boilerplate code around a block.  You'll see it when opening a file to
automatically close it, or in a fabric script to cd into a directory for a
block of code.

Here it's just saying that the block of code inside the with statement
should raise a ValidationError

On Wednesday, November 13, 2013, Steve Lamb wrote:

> In tests/__init__.py:
>
> > +
> > +    def test_validate_no_dots(self):
> > +        self.assertValidatedEquals('karg', 'karg.csv')
> > +
> > +    def test_validate_multiple_dots_csv(self):
> > +        self.assertValidatedEquals('hort.town.csv',
> > +                                   'horttown.csv')
> > +
> > +    def test_validate_regular_csv(self):
> > +        self.assertValidatedEquals('roke-knoll.csv',
> > +                                   'roke-knoll.csv')
> > +
> > +    def test_non_csv_raises(self):
> > +        self.assertRaises(ValidationError,
> > +                          djqscsv._validate_and_clean_filename,
> > +                          'gont.island')
>
> whoa, I had no idea you could do that, and I don't understand how it
> works. Do you have links to more info?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/azavea/django-queryset-csv/pull/12/files#r7650766>
> .
>


-- 
Michael V. Maurizi Jr
Software Developer
Azavea |  340 N 12th St, Suite 402, Philadelphia, PA
mmaurizi@azavea.com  | T 215.558.6190
Web azavea.com <http://www.azavea.com/>  |  Blog
azavea.com/blogs<http://www.azavea.com/Blogs>
| Twitter @azavea <http://twitter.com/azavea>