def test_weekly_working_days_is_a_read_only_attribute():
    """testing if the weekly working days is a read-only attribute
    """
    wh = WorkingHours()
    with pytest.raises(AttributeError) as cm:
        wh.weekly_working_days = 6

    assert str(cm.value) == "can't set attribute"
Esempio n. 2
0
    def test_weekly_working_days_is_a_read_only_attribute(self):
        """testing if the weekly working days is a read-only attribute
        """
        wh = WorkingHours()
        with self.assertRaises(AttributeError) as cm:
            wh.weekly_working_days = 6

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