lettuce icon indicating copy to clipboard operation
lettuce copied to clipboard

Model entry of Fixture wiped clean on world.browser.visit(django_url(url))

Open robrechtdr opened this issue 11 years ago • 2 comments

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 

robrechtdr avatar Jan 16 '14 22:01 robrechtdr

Could it be caching?

danni avatar Feb 12 '14 12:02 danni

I haven't implemented any caching in my project yet.

robrechtdr avatar Feb 12 '14 17:02 robrechtdr