def test_cant_modify(self): # ensure a Pin is immutable once initialized pin = Pin(service='metrics') with assert_raises(AttributeError): pin.service = 'intake'
def test_cant_modify(self): # ensure a Pin is immutable once initialized pin = Pin(service='metrics') with assert_raises(AttributeError): pin.service = 'intake'
def test_cant_modify(self): # ensure a Pin is immutable once initialized pin = Pin(service="metrics") with pytest.raises(AttributeError): pin.service = "intake"
def test_cant_modify(): p = Pin(service="abc") try: p.service = "other" except AttributeError: pass