tomchristie/django-rest-framework — pull request #2359 by rockymeza (2014-12-27 05:37:02+00:00)
Title: [don't merge] TestRootWithAListlessViewset problem

This modifies the TestDynamicListAndDetailRouter testcase to demonstrate
that the way it is written is broken. Fortunately it is just the test
that is broken and not the actual APIRoot code.

The reason this test fails is that router created in
TestRootWithAListlessViewset.setUp is never installed into the URLs.
When APIRoot attempts to reverse the URLs in APIRoot.get. The URL
reversal for the ListlessNoteViewSet should fail because it doesn't have
a list action, but the FullNoteViewSet does have a list action, the
reason it fails is that the URLs were never installed.

The easiest way to resolve this would be to move the Router declaration to a separate URLs file like in #2354. I don't know if I should do that in the same PR though.