Colin Watson has proposed merging ~cjwatson/launchpad:translations-tests-layer
into launchpad:master.
Commit message:
Move some translations doctests to LaunchpadZopelessLayer
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/427623
`sourcepackagerelease-translations.rst` and `translations-export-to-branch.rst`
are essentially tests of script functions (translation import and export jobs
respectively); they don't run as any particular user. As such, it's
inappropriate to run them in `LaunchpadFunctionalLayer` (which uses a
webapp-style per-user security policy), and it makes more sense to run them in
`LaunchpadZopelessLayer`.
While it isn't necessary yet, this will become useful once we tighten up more
factory methods to return security-proxied objects.
--
Your team Launchpad code reviewers is requested to review the proposed merge of
~cjwatson/launchpad:translations-tests-layer into launchpad:master.
diff --git a/lib/lp/translations/tests/test_doc.py b/lib/lp/translations/tests/test_doc.py
index bf7a401..735df32 100644
--- a/lib/lp/translations/tests/test_doc.py
+++ b/lib/lp/translations/tests/test_doc.py
@@ -28,14 +28,20 @@ special = {
tearDown=tearDown,
layer=LaunchpadFunctionalLayer,
),
- "translationimportqueue.rst": LayeredDocFileSuite(
- "../doc/translationimportqueue.rst",
+ "rosetta-karma.rst": LayeredDocFileSuite(
+ "../doc/rosetta-karma.rst",
setUp=setUp,
tearDown=tearDown,
layer=LaunchpadFunctionalLayer,
),
- "rosetta-karma.rst": LayeredDocFileSuite(
- "../doc/rosetta-karma.rst",
+ "sourcepackagerelease-translations.rst": LayeredDocFileSuite(
+ "../doc/sourcepackagerelease-translations.rst",
+ setUp=setUp,
+ tearDown=tearDown,
+ layer=LaunchpadZopelessLayer,
+ ),
+ "translationimportqueue.rst": LayeredDocFileSuite(
+ "../doc/translationimportqueue.rst",
setUp=setUp,
tearDown=tearDown,
layer=LaunchpadFunctionalLayer,
@@ -45,6 +51,12 @@ special = {
setUp=setGlobs,
layer=LaunchpadZopelessLayer,
),
+ "translations-export-to-branch.rst": LayeredDocFileSuite(
+ "../doc/translations-export-to-branch.rst",
+ setUp=setUp,
+ tearDown=tearDown,
+ layer=LaunchpadZopelessLayer,
+ ),
"translationsoverview.rst": LayeredDocFileSuite(
"../doc/translationsoverview.rst",
setUp=setGlobs,
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help : https://help.launchpad.net/ListHelp