Skip to content
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

Using nose-mongoengine together with django-nose #4

Open
PabloCastellano opened this issue Jul 23, 2015 · 1 comment
Open

Using nose-mongoengine together with django-nose #4

PabloCastellano opened this issue Jul 23, 2015 · 1 comment

Comments

@PabloCastellano
Copy link

Hello. I'm opening this issue because I have found a strange behaviour.

I have developed a web application using Django, mongodb for database and nose for tests.
So nose-mongoengine fits perfectly in my project.

When I run the tests directly from nose:

nosetests --mongoengine

It works as expected: a mongo instance is launched, a DB is created and then everything is cleaned.

However when I run it from Django like:

./manage.py test

which executes the following:

nosetests --mongoengine --verbosity=1

it won't launch mongo nor will create a new DB. It will use instead the DB configured in Django's settings.py, causing the tests to fail.
Is this behaviour expected? Any hint how can I solve it?

PabloCastellano added a commit to PabloCastellano/libreborme that referenced this issue Jul 28, 2015
Problema:
nosetests --mongoengine borme/tests/test_borme_foo.py
va bien porque carga el plugin, levanta mongo, crea la BD, ejecuta tests y limpia.

Pero si se ejecuta mediante manage.py (django-nose) no y coge la BD que usa la aplicacion web.

./manage.py test libreborme/tests/test_http.py
DJANGO_SETTINGS_MODULE=libreborme.settings nosetests --mongoengine borme/tests/test_borme_foo.py

Issue en github: mbanton/nose-mongoengine#4
PabloCastellano added a commit to PabloCastellano/libreborme that referenced this issue Aug 7, 2015
Problema:
nosetests --mongoengine borme/tests/test_borme_foo.py
va bien porque carga el plugin, levanta mongo, crea la BD, ejecuta tests y limpia.

Pero si se ejecuta mediante manage.py (django-nose) no y coge la BD que usa la aplicacion web.

./manage.py test libreborme/tests/test_http.py
DJANGO_SETTINGS_MODULE=libreborme.settings nosetests --mongoengine borme/tests/test_borme_foo.py

Issue en github: mbanton/nose-mongoengine#4
@mbanton
Copy link
Owner

mbanton commented Nov 10, 2015

Thanks for the report, but unfortunately at the moment I do not have time to resume this project and fix it. Feel free to send codes via PR.

Thanks you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants