Questions tagged [django-nose]

Django test runner that uses nose.

django-nose is a Django test runner that uses nose.

It extends Django's built-in test command allowing to use all nose features and introduces more.

81 questions
1
vote
1 answer

Django-nose failure - KeyError: u'en-us'

I have all of my TestCase files in a django app called 'tests'. Running a specific TestCase works just fine with this command: python run manage.py test tests.myTestCaseFile However, when i run the entire set of TestCases in the tests folder this…
DannyMoshe
  • 6,023
  • 4
  • 31
  • 53
1
vote
0 answers

Database model custom JSONField values persisting between test cases

I'm using a Django database model to store objects corresponding to a remote ticket service. In testing this model, I'm running several tests to make sure that log messages work correctly for the database model - I'm using Django-nose to run these…
Green Cloak Guy
  • 23,793
  • 4
  • 33
  • 53
1
vote
1 answer

ImportError: No module django_nose

I following this pluralsight course and running into this error everytime I run the command: python manage.py test --settings=todobackend.settings.test I'm new to the Django framework; Could the problem be that my django version (1.9.0) only…
pelican
  • 5,846
  • 9
  • 43
  • 67
1
vote
0 answers

Django Nose - Need to capture output while running tests

I am running running django-nose tests in a management command using call_command. I need to capture output and do something with it, depending on if it failed or passed. My current code in management command : content = StringIO() try: …
iamkhush
  • 2,562
  • 3
  • 20
  • 34
1
vote
1 answer

Django - Running tests multiple times with different fixtures

Is there way to run tests multiple times with different fixtures with django-nose (or any other library)? I want to check how my project runs with different number of data. As I searched I find out that there is no way to pass fixtures as argument…
Arturo
  • 71
  • 6
1
vote
1 answer

Django Nose ImportError: no modules named urls

I started using django-nose because I wanted to to run only my apps' tests via python manage.py test, but I'm running into this ImportError: no modules named urls. This project is using Django 1.4. The folder structure is like so: project ├──…
Huey
  • 2,714
  • 6
  • 28
  • 34
1
vote
0 answers

Django-nose cannot find tests in folders

I know there are similar questions on StackOverflow, but I can't quite find one that matches my situation. I'm working on an app built by someone else and have been adding tests. The folder structure is like so: my_project ├── apps │ ├── app1 | …
Huey
  • 2,714
  • 6
  • 28
  • 34
1
vote
1 answer

django-nose: Fails to see custom user model with --failed

I'm running tests with nose and would like to take advantage of the --failed flag. But as soon as I add it I get errors like these for user related models: ./manage.py test # works ./manage.py test --failed # fails CommandError: One or more models…
djangonaut
  • 7,233
  • 5
  • 37
  • 52
1
vote
1 answer

Why does my Django factory function create models in local DB, not test DB?

I have some tests in my Django project that needs to create a few models and save them to the DB. I extracted the instance-creating code into some "factory" functions that lives in a separate module (.py file), helping me to quickly create sets of…
Emil
  • 1,949
  • 2
  • 16
  • 25
1
vote
1 answer

Testing Django 1.5 apps with custom user

Getting the error CommandError: One or more models did not validate: admin.logentry: 'user' has a relation with model su.SuUser, which has either not been installed or is abstract.` when I run python manage.py test. su is my user app, and app is…
Andrew Sledge
  • 10,163
  • 2
  • 29
  • 30
1
vote
0 answers

ImproperlyConfigured: The staticfiles view can only be used in debug mode or if the --insecure option of 'runserver' is used

I'm getting: ImproperlyConfigured: The staticfiles view can only be used in debug mode or if the --insecure option of 'runserver' is used when I try to run my tests. I know I have to serve my static files but my question is, since…
chachan
  • 2,382
  • 1
  • 26
  • 41
1
vote
1 answer

How can I clean up database changes made in django-nose test functions?

We write our test suite using nose function tests for a variety of reasons. When running the test suite for our Django application, we would like to avoid leaking any data out of these tests (as with django.test.TestCase), because that leads to…
Daniel Watkins
  • 1,656
  • 1
  • 15
  • 25
1
vote
0 answers

django-nose taking 15 seconds even when there are zero test

I'm using django-nose with REUSE_DB=1 and have disabled all my tests just to see the setup time it takes. localhost:MyProject rohitjangid$ python manage.py test nosetests --verbosity…
Rohit
  • 1,878
  • 19
  • 26
1
vote
1 answer

Django, nose and selenium .. the initial state error

I have installed everything for Django 1.3.1 : django-nose , django-nose-selenium , and set the test-runner as well: TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' First it seems that by running the command: $./manage.py test, Django's internal…
Soask
  • 691
  • 12
  • 21
0
votes
0 answers

Why does nose ignore certain files on coverage report?

I am running tests on a project I've been assigned to. Everything is triggered by calling tox. Default tests run with nose, which adds a coverage report, this is the command that tox calls: django-admin test -s and settings file has this…
Alvaro Rodriguez Scelza
  • 3,643
  • 2
  • 32
  • 47