Пример #1
0
def test_Mod_can_delete_others_post(moderator_user, topic):
    request = SimpleNamespace(view_args={'post_id': topic.first_post.id})
    assert r.CanDeletePost(moderator_user, request)
Пример #2
0
def test_Mod_can_delete_others_post(moderator_user, topic, request_context):
    push_onto_request_context(post=topic.first_post)
    assert r.CanDeletePost(moderator_user, request)
Пример #3
0
def test_Fred_cannot_delete_others_post(Fred, topic):
    request = SimpleNamespace(view_args={'post_id': topic.first_post.id})
    assert not r.CanDeletePost(Fred, request)
Пример #4
0
def test_Fred_cannot_delete_others_post(Fred, topic, request_context):
    push_onto_request_context(post=topic.first_post)
    assert not r.CanDeletePost(Fred, request)