Allow looking up resources for deferred models
Review Request #7603 — Created Aug. 20, 2015 and submitted
Previously, if you tried to look up the resource for a deferred model,
it would not return a resource. This has been corrected.
Attempted to look up the resource of a deferred model. It worked.
Ran unit tests.
-
Awesome :) Glad to see this fixed.
Can you throw together a unit test so it doesn't regress if Django does something different?
Testing Done: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+55 -2) |
-
Tool: Pyflakes Processed Files: djblets/testing/testcases.py djblets/webapi/tests/test_registry.py djblets/webapi/resources/registry.py Tool: PEP8 Style Checker Processed Files: djblets/testing/testcases.py djblets/webapi/tests/test_registry.py djblets/webapi/resources/registry.py
-
-
-
djblets/webapi/tests/test_registry.py (Diff revision 2) Probably should catch here and do the unregister in a
finally
clause. -
-
-
Tool: Pyflakes Processed Files: djblets/testing/testcases.py djblets/webapi/tests/test_registry.py djblets/webapi/resources/registry.py Tool: PEP8 Style Checker Processed Files: djblets/testing/testcases.py djblets/webapi/tests/test_registry.py djblets/webapi/resources/registry.py