def METHOD_NAME(self):
    testTypes = ['dp/p', 'dE/E', 'dp', 'dE']
    for t in testTypes:
        cBeam.generate_coasting_beam(self.beam, 0, self.ring.t_rev[0],
                                     spread_type=t)
    with self.assertRaises(blExcept.DistributionError,
                           msg="""Invalid spread type 
                           should raise exception"""):
        cBeam.generate_coasting_beam(self.beam, 0, self.ring.t_rev[0],
                                     spread_type='bad spread')