-
Notifications
You must be signed in to change notification settings - Fork 17
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
@before.all runs before the testing database is created #118
Comments
This is not right. What versions of Aloe, Aloe-Django, Django and Python are you using? |
|
Did you install https://aloe.readthedocs.org/projects/aloe-django ? |
Ah, yes, I did. I'm sorry, I forgot to mention it before.
|
Please make the callback raise an exception, and paste the resulting traceback. |
./manage.py harvest directory/features/user_create_normal_account.feature
nosetests directory/features/user_create_normal_account.feature --verbosity=1
Creating test database for alias 'default'...
E
======================================================================
ERROR: Failure: Exception ()
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/nose/failure.py", line 39, in
runTest
raise self.exc_val.with_traceback(self.tb)
File "/usr/local/lib/python3.5/site-packages/nose/plugins/manager.py",
line 154, in generate
for r in result:
File "/usr/local/lib/python3.5/site-packages/aloe/plugin.py", line 204,
in loadTestsFromFile
self.ensure_before_callbacks()
File "/usr/local/lib/python3.5/site-packages/aloe/plugin.py", line 225,
in ensure_before_callbacks
before_all()
File "/usr/local/lib/python3.5/site-packages/aloe/registry.py", line 186,
in before_func
before_hook(*args, **kwargs)
File "/work/royalty_exchange_project/directory/features/browser.py", line
67, in before_all_test
raise Exception()
Exception
----------------------------------------------------------------------
Ran 1 test in 0.001s
FAILED (errors=1)
Destroying test database for alias 'default'... I tried to use this hook to create a test user and I noticed that the user was been added to my |
Confirmed here - running just |
Uh, OK, I didn't notice this difference, since I always specify the feature files. Thanks for investigating it! |
Hey, guys!
I used the decorator
@before.all
, but I noticed that my function ran even before the creation of the test database, writing data into my real database.Is this the expected behavior?
This is a great library, by the way! ;-)
The text was updated successfully, but these errors were encountered: