'L{File._parseRangeHeader} raises L{ValueError} when passed
syntactically invalid byte ranges.'

def test_invalidRanges(self):

    f = self.resource._parseRangeHeader
    self.assertRaises(ValueError, f, 'bytes')
    self.assertRaises(ValueError, f, 'unknown=1-2')
    self.assertRaises(ValueError, f, 'bytes=3')
    self.assertRaises(ValueError, f, 'bytes=-')
    self.assertRaises(ValueError, f, 'bytes=foo-')
    self.assertRaises(ValueError, f, 'bytes=-foo')
    self.assertRaises(ValueError, f, 'bytes=5-4')
