django-nose
django-nose copied to clipboard
Fix FastFixtureTestCase to support testcases without fixtures.
Since Django 1.7, using the FastFixtureTestCase without specifying a list of fixtures to use raises this exception:
Traceback (most recent call last):
File "nose/suite.py", line 209, in run
self.setUp()
File "nose/suite.py", line 292, in setUp
self.setupContext(ancestor)
File "nose/suite.py", line 315, in setupContext
try_run(context, names)
File "nose/util.py", line 471, in try_run
return func()
File "django_nose/testcases.py", line 49, in setUpClass
cls._fixture_setup()
File "django_nose/testcases.py", line 72, in _fixture_setup
'database': db})
TypeError: call_command() argument after * must be a sequence, not NoneType
triggered here:
call_command('loaddata', *cls.fixtures, **{'verbosity': 0,
'commit': False,
'database': db})
Since Django 1.7 sets fixtures to None by default, django-nose should support this possibilty too. :-)
I also think the way forward is to re-sync w/ the current Django code. I'd like tests for FastFixtureTestCase (issue #220) before I start merging fixes.