Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a "good" API #3

Open
matclab opened this issue Jan 22, 2017 · 1 comment
Open

Define a "good" API #3

matclab opened this issue Jan 22, 2017 · 1 comment

Comments

@matclab
Copy link
Owner

matclab commented Jan 22, 2017

The way the test are written (with w fixtures, and call and form_post imported from the helper module) is mainly inherited from day to day patching in order to make test work.

The API shall certainly be think about a bit more to adjust to the need express by people.

The actual state of the API shall be documented first though.

@matclab
Copy link
Owner Author

matclab commented Jan 22, 2017

For now, the fixtures which have the same name that call arguments, shall be set explicitly:

@pytest.fixture
def controller():
   return 'myctrl'

def test_call(w, controller):
   assert call(w, 'funcname', controller=controller)

It would be nice to be able in call to use the fixtures for the parameters…

Not sure if doable without too much of magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant