def test_to_tjp_attribute_is_read_only():
    """testing if the to_tjp attribute is read only
    """
    wh = WorkingHours()
    with pytest.raises(AttributeError) as cm:
        wh.to_tjp = 'some value'

    assert str(cm.value) == "can't set attribute"
Beispiel #2
0
    def test_to_tjp_attribute_is_read_only(self):
        """testing if the to_tjp attribute is read only
        """
        wh = WorkingHours()
        with self.assertRaises(AttributeError) as cm:
            wh.to_tjp = 'some value'

        self.assertEqual(str(cm.exception), "can't set attribute")