franco / args_catcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

args-catcher

Simple python test helper that allows for catching arguments and asserting on them:

from args_catcher import catch_args


def test_1():
    args_catcher = catch_args(allow(my_view).render.and_return('some text'))
    my_view.index(...)
    context = args_catcher.args[2]
    assert 'some_key' in context

Legal

This software is released under the MIT License. © 2018 siroop AG, Franco Sebregondi.

About


Languages

Language:Python 100.0%