Fixed #19885 - cleaned up the django.test namespace #1604

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants
@marfire
Contributor

marfire commented Sep 9, 2013

Common testing tools - in particular, the ones referenced in the tutorial
and in the testing overview - were made importable from django.test.
The documentation was cleaned up to consistently refer to these
tools as being part of django.test.

Note that I did not adjust all the internal references (in Django's own test code) to use this path. I can do that, but I'm not sure if it's necessary or desirable.

See ticket #19885.

Fixed #19885 - cleaned up the django.test namespace
Common testing tools - in particular, the ones referenced in the tutorial
and in the testing overview - were made importable from django.test.
The documentation was cleaned up to consistently refer to these
tools as being part of django.test.
@@ -5,18 +5,18 @@ Advanced testing topics
The request factory
===================
-.. module:: django.test.client
+.. currentmodule:: django.test

This comment has been minimized.

@timgraham

timgraham Sep 9, 2013

Member

the next ".. currentmodule:: django.test" can be removed since it's redundant with this change

@timgraham

timgraham Sep 9, 2013

Member

the next ".. currentmodule:: django.test" can be removed since it's redundant with this change

@timgraham

View changes

docs/topics/testing/overview.txt
@@ -313,8 +313,7 @@ Django provides a small set of tools that come in handy when writing tests.
The test client
---------------
-.. module:: django.test.client
- :synopsis: Django's test client.
+.. currentmodule:: django.test

This comment has been minimized.

@timgraham

timgraham Sep 9, 2013

Member

looks like this can be omitted -- the module is already django.test

similarly, the next ".. currentmodule:: django.test" in the doc is no longer needed

@timgraham

timgraham Sep 9, 2013

Member

looks like this can be omitted -- the module is already django.test

similarly, the next ".. currentmodule:: django.test" in the doc is no longer needed

@timgraham

View changes

docs/topics/testing/overview.txt
@@ -1330,17 +1328,16 @@ Django provides a standard Python context manager (see :pep:`343`)
This example will override the :setting:`LOGIN_URL` setting for the code
in the ``with`` block and reset its value to the previous state afterwards.
-.. currentmodule:: django.test.utils
+.. currentmodule:: django.test

This comment has been minimized.

@timgraham

timgraham Sep 9, 2013

Member

not needed and remove next occurrence of ".. currentmodule:: django.test"

we should also have a ..versionchanged:: 1.7 note here that it had to be imported from utils in previous versions

@timgraham

timgraham Sep 9, 2013

Member

not needed and remove next occurrence of ".. currentmodule:: django.test"

we should also have a ..versionchanged:: 1.7 note here that it had to be imported from utils in previous versions

Made changes suggested by Tim Graham
- Removed unnecessary currentmodule directives
- Added a versionchanged directive for override_settings()
@marfire

This comment has been minimized.

Show comment
Hide comment
@marfire

marfire Sep 9, 2013

Contributor

@timgraham Thanks for your comments, I made the suggested changes.

Contributor

marfire commented Sep 9, 2013

@timgraham Thanks for your comments, I made the suggested changes.

@timgraham

This comment has been minimized.

Show comment
Hide comment
@timgraham

timgraham Sep 9, 2013

Member

There are still quite a few errors (broken links) when building the docs after this change - could you fix them?

Member

timgraham commented Sep 9, 2013

There are still quite a few errors (broken links) when building the docs after this change - could you fix them?

@marfire

This comment has been minimized.

Show comment
Hide comment
@marfire

marfire Sep 9, 2013

Contributor

Sorry, missed those warnings in the Sphinx output...

Contributor

marfire commented Sep 9, 2013

Sorry, missed those warnings in the Sphinx output...

@timgraham

This comment has been minimized.

Show comment
Hide comment
@timgraham

timgraham Sep 9, 2013

Member

merge in 9d70032 - thanks!

Member

timgraham commented Sep 9, 2013

merge in 9d70032 - thanks!

@timgraham timgraham closed this Sep 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment