def test_minor_change_observer_added_for_minor_changes_notification_level(self, observed_item): settings = NotificationSettingsFactory.build( notification_level=MINOR_CHANGES_NOTIFICATIONS ) settings_handler = ObservationManager() settings_handler.update_observers(settings, MINOR_CHANGE) self.assertTrue(observed_item.called)
def test_minor_change_observer_added_for_minor_changes_notification_level( self, observed_item): settings = NotificationSettingsFactory.build( notification_level=MINOR_CHANGES_NOTIFICATIONS) settings_handler = ObservationManager() settings_handler.update_observers(settings, MINOR_CHANGE) self.assertTrue(observed_item.called)
def create_fake_settings(**kwargs): if not "notification_level" in kwargs: kwargs["notification_level"] = NO_NOTIFICATIONS return NotificationSettingsFactory.build(**kwargs)