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
2
votes
1 answer

Using django-nose and unittest-xml-reporting together - unit testing

We have a django project that using unittest-xml-reporting to provide bamboo with xml files about the test results. We would like to integrate django-nose to test for code coverage. But since django tests require a single TEST_RUNNER class, I don't…
András Gyömrey
  • 1,770
  • 1
  • 15
  • 36
2
votes
1 answer

Using multiple processors with django-nose produces DatabaseError

I am trying to run our test suite using django-nose with multiple processors to cutdown on runtime. All tests pass with 1 processor, but using multiple processors produces a DatabaseError: server closed the connection unexpectedly I found two tests…
2
votes
2 answers

Testing in Django 1.7 throws warning: RemovedInDjango18Warning

When I do my tests with Django 1.7.1 it throws the next warning: /usr/local/lib/python2.7/dist-packages/django/test/_doctest.py:59: RemovedInDjango18Warning: The django.test._doctest module is deprecated; use the doctest module from the Python…
Víctor M
  • 307
  • 4
  • 16
2
votes
0 answers

building test cases in django with celery dependency and django-nose

I've been trying to build test cases for what I've been doing with my django project. In the project, there are few celery tasks that executes when signals (pre_save, post_delete..etc) Also I've been using django-nose as my test_runner, so in order…
Mo J. Mughrabi
  • 6,747
  • 16
  • 85
  • 143
2
votes
1 answer

Nosetests giving "Improperly Configured" Error

I'm learning to use django-nose but I'm having trouble setting it up. ./manage.py test works just fine. But nosetests doesn't. I've added django_nose to INSTALLED_APPS and set TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'. Still it's raising…
2
votes
1 answer

Django-nose won't run individual TestCase classes

I'm getting an error when trying to run an individual TestCase using django-nose $ ./manage.py test someapp.ModelTest nosetests someapp.ModelTest --nologcapture --verbosity=1 Creating test database for alias…
Will
  • 187
  • 6
2
votes
1 answer

pdb still will not show output even after using -s option with Django Nose

I'm trying to debug my tests and I am using a custom testrunner. I am able to get pdb to function just fine when I am not using it in conjunction with manage.py. in mysite/blog/tests/models_tests.py I have the following lines on top: import pdb;…
Jon Poler
  • 183
  • 12
2
votes
1 answer

python - Nose not discovering package level tests in Django

I'm setting up a directory structure for my Django app to separate functional and unit tests. I am using nose as the test runner for my Django project. At the root of the Django project, I have a folder called "tests" that has this…
user1496984
  • 10,957
  • 8
  • 37
  • 46
2
votes
0 answers

Is there a way to tell django-nose to handle multiple databases?

(Cross-posted here: https://github.com/jbalogh/django-nose/issues/129) In settings.py I have two databases listed: DATABASES = { 'default': { 'ENGINE': 'mysql_pymysql', 'NAME': 'OST_DEV_1', 'USER': 'root', …
warbaker
  • 21
  • 1
2
votes
1 answer

Why is django-nose running tests twice?

I have the following models: class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeField(auto_now_add=True) def __unicode__(self): return self.question and the following test from…
user1629366
  • 1,931
  • 5
  • 20
  • 30
2
votes
1 answer

How to know when tests are running with django-nose

I'm using django-nose to run my tests and I need to know when they are running from inside my views/models methods/etc so I can skip stuff like checking cache values or calling some project-external resources for example only when running the…
Gerard
  • 9,088
  • 8
  • 37
  • 52
2
votes
0 answers

Django-nose --with-profile getting no results ("0 function calls")

I'm trying to diagnose some slow running unit tests, but I'm not having any luck getting the profiler working with django-nose. I came up with a repo case on a brand new Django project. django-admin.py startproject nosetest cd nosetest/ virtualenv…
Chase Seibert
  • 15,703
  • 8
  • 51
  • 58
1
vote
0 answers

FastTenantTestCase : Exception: Can't create tenant outside the public schema. Current schema is fast_test #938

Trying to run test cases using FastTenantTestCase, following are the package versions: django - 3.2.16 django-tenants - 3.3.4 Sample code: from django_tenants.test.cases import FastTenantTestCase class…
1
vote
1 answer

Why do I have a 'KeyError' error when using when using Django's coverage tool

Im developing a django API. Now im doing some tests on the endpoints and when i execute 'python manage.py test' everything goes well. But when i use the flag '--with-coverage' or 'coverage run --source='.' manage.py test app && coverage report' i…
Helio
  • 11
  • 3
1
vote
1 answer

Duplicate key error running tests with django-nose but not with Django's DiscoverRunner

When I run my tests with the default Django testrunner (django.test.runner.DiscoverRunner), everything works fine. When I run them using nose (for the XML output), I get IntegrityErrors from tests that aren't mine. Override this method to return an…
darth_mall
  • 984
  • 8
  • 16