def METHOD_NAME(self):
    """
    Ensure that assigning an incorrect type to an attribute raises an exception
    """
    def _assign():
        self.p.a = 'fail'
    self.assertRaises(GangaCore.Core.exceptions.TypeMismatchError, _assign)