Open boechat107 opened 8 years ago
This is not right. What versions of Aloe, Aloe-Django, Django and Python are you using?
python==3.5.1
django==1.9.6
aloe==0.1.8
Did you install https://aloe.readthedocs.org/projects/aloe-django ?
Ah, yes, I did. I'm sorry, I forgot to mention it before.
aloe-django==0.1.1
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 default database.
Confirmed here - running just harvest
works, specifying a feature file breaks.
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! ;-)