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)
示例#2
0
    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)
示例#3
0
def create_fake_settings(**kwargs):
    if not "notification_level" in kwargs:
        kwargs["notification_level"] = NO_NOTIFICATIONS
    return NotificationSettingsFactory.build(**kwargs)
def create_fake_settings(**kwargs):
    if not "notification_level" in kwargs:
        kwargs["notification_level"] = NO_NOTIFICATIONS
    return NotificationSettingsFactory.build(**kwargs)