-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I'm testing some Django code, and I'd like to use the Django test client. This is available in Pytest via pytest-django providing a client fixture.
It's meant to be used like this:
def test_with_client(client):
response = client.get('/')
assert response.content == 'Foobar'
I think the most natural way to adapt this to the Hitchstory approach is to add the decorator to my test_foo Pytest function:
def test_foobar(client):
hs.named("Something with a client").play()
but it's not obvious there's a clean way to pass the client object through so that the engine can get at it. I think the client is recreated with each test (it potentially holds state) so we don't want to create the client once and include it when instantiating the engine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels