lettuce
lettuce copied to clipboard
Model entry of Fixture wiped clean on world.browser.visit(django_url(url))
Just before I run a step I'm loading a fixture with call_command('loaddata', 'my_app/initial_data.json')
that sets up a second site entry in the Site
model:
@step(u'I go to the URL "(.*)"')
def i_go_to_the_url(step, url):
call_command('loaddata', 'my_app/initial_data.json')
import pdb; pdb.set_trace()
world.browser.visit(django_url(url))
The second Site
entry is loaded when checked with pdb
, yet when the
world.browser.visit(django_url(url))
is called (the url checks for the entry) then
the Site
table only has one entry again!!!
This is really strange! Any idea why this is happening?
Btw I'm calling lettuce tests like this:
python manage.py harvest -T -d --failfast --apps=my_app --settings=my_project.settings.test
Could it be caching?
I haven't implemented any caching in my project yet.