Open btbonval opened 10 years ago
This stackoverflow notes the same problem. The chosen answer is already done in the code properly. A secondary answer is this: http://stackoverflow.com/a/18160158/1867779
Suggests the order of MIDDLEWARE matters. We have a Csrf stuck in the middle. Not sure if that causes the problem or not.
Another SO which looks a lot like our config having the same problem. No answers. http://stackoverflow.com/questions/15193545/django-contrib-messages-middleware-messagemiddleware-bug
Weird. Never had this problem myself.
Oh it's ye olde wrong test problem again. I thought there were a bit too many tests but I hadn't realized it when filing the ticket. It's running the south tests, not the unit tests. this time I installed all the dev stuff, too. Not sure why it can't find the right nosetest/coverage stuff from manage this time, but whatever.
Annoying that south and coverage are both aliasing to 'test'.
Closing as invalid.
Yeah I cannot get django-nose to pop up on python manage.py
at all, even though it is installed. The only real difference is a newer version of South, but I can't imagine why that'd cause south to more strongly take over the 'test' identifier.
The good news (for me) is that this is a known bug: http://south.aeracode.org/ticket/958
and someone wrote a little diddy to work around it when one's system refuses to work with the two packages nicely: https://gist.github.com/ErikEvenson/5455439
I copied that gist into a nosetest.py file under management/commands for local. Since no one else has the problem, I won't push this.
crap even that gist is running south tests and not nose tests. I can't run just our tests using python manage stuff.
I'm not sure how to recursively search for tests under apps using nose. It always looks for tests in the current directory and recurses through that.
Whatever. Who needs testing? Ticket stays closed!
This is still a problem for me, a year later, and with a new environment. @yourcelf updated tests, but I cannot run them. I'm reopening this ticket.
Additionally, we don't have testing documented in the README, which would be good to toss in somewhere. Make sure the environment works before deploying sort of thing.
This is my manage.py help
output (look for south/test and django-nose/test):
Available subcommands:
[account]
account_emailconfirmationmigration
account_unsetmultipleprimaryemails
[auth]
changepassword
createsuperuser
[compressor]
compress
mtime_cache
[courses]
dump_json
fetch_usde_csv
fix_note_counts
import_json
import_usde_csv
sanitize_usde_schools
[django]
cleanup
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
runfcgi
shell
sql
sqlall
sqlclear
sqlcustom
sqlflush
sqlindexes
sqlinitialdata
sqlsequencereset
startapp
startproject
validate
[djcelery]
camqadm
celery
celerybeat
celerycam
celeryctl
celeryd
celeryd_detach
celeryd_multi
celeryev
celerymon
djcelerymon
[gunicorn]
run_gunicorn
[notes]
add_canonical_link
convert_notes_to_markdown
import_ocw_json
populate_filepicker
populate_indexden
regen_note_slugs
strip_html_to_text
tweet_note
[quizzes]
get_mturk_results
[reversion]
createinitialrevisions
deleterevisions
[sessions]
clearsessions
[south]
convert_to_south
datamigration
graphmigrations
migrate
migrationcheck
schemamigration
startmigration
syncdb
test
testserver
[staticfiles]
collectstatic
findstatic
runserver
Bunch of MessageFailure errors while running
python manage.py test
. Not sure if this is from new code and should be ignored, or if this means all kinds of things will not run correctly.I'm guessing someone forgot to add this to reqs: "django.contrib.messages.middleware.MessageMiddleware"?
Here's one for example: