Beispiel #1
0
    def test_viewstate_cannot_be_set(self):
        """ViewState is read only and can not be set once the NC is instantiated."""
        v = ViewState(MagicMock())
        n = NotificationCentre(v)
        new_v = ViewState(MagicMock())

        with self.assertRaises(AttributeError):
            n.view_state = new_v