There is some issue with loading django_url variable from letttuce.django. When the function is implemented like in documentation:
from lettuce import step, world
from lettuce.django import django_url
@step(r'I log in$')
def log_in_trader(step):
world.browser.visit(django_url(reverse('login')))
it keeps returning:
Traceback (most recent call last):
File "/env/local/lib/python2.7/site-packages/lettuce/core.py", line 144, in __call__
ret = self.function(self.step, *args, **kw)
File "/vagrant/app/starspread/utils/features/login.py", line 8, in log_in_trader
world.browser.visit(django_url(reverse('login')))
TypeError: 'NoneType' object is not callable
what is caused by None django_url.
The fix I've done is implementing all functions this way:
from lettuce import step, world
@step(r'I log in$')
def log_in_trader(step):
from lettuce.django import django_url
world.browser.visit(django_url(reverse('login')))
what fixes the NoneType Error.
I'm running 0.2.20 version of lettuce with 1.9.7 version of phantomjs.
There is some issue with loading django_url variable from letttuce.django. When the function is implemented like in documentation:
it keeps returning:
what is caused by None django_url.
The fix I've done is implementing all functions this way:
what fixes the NoneType Error.
I'm running 0.2.20 version of lettuce with 1.9.7 version of phantomjs.