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

Can define callbacks to run before and after all #17

Closed
gabrielfalcao opened this issue Apr 4, 2010 · 1 comment
Closed

Can define callbacks to run before and after all #17

gabrielfalcao opened this issue Apr 4, 2010 · 1 comment

Comments

@gabrielfalcao
Copy link
Owner

It can be defined in any file that will be imported by lettuce.

But lettuce documentation should tell to use it at terrain.py

examples:
from lettuce.terrain import before
from lettuce.terrain import after

@before.all
def populate_database(scenario):
    from my_models import Person
    Person(name="John Doe").save()

@after.all
def reset_database(scenario):
    from my_models import Person
    Person.delete_all()
@gabrielfalcao
Copy link
Owner Author

Can now define callbacks for before and after all. closed by 3a8f18d

This issue was closed.
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