コード例 #1
0
def test_misconfigured_add_notification_is_noop():
    n_notifs = Notification.objects.count()
    AddNotification(
        make_bind_data(
            constants={
                "recipient_type": RecipientType.SPECIFIC_USER,
                "message": "This'll never get delivered!",
            })).execute(Context())
    assert Notification.objects.count() == n_notifs
コード例 #2
0
def test_templated_binding_syntax_errors_swallowed():
    tb = TemplatedBinding("z", constant_use=ConstantUse.CONSTANT_ONLY)
    assert tb.get_value(Context(), {"constant": "{{"}) == "{{"