launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19349
[Merge] lp:~wgrant/launchpad/builder-tests-to-buildmaster into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/builder-tests-to-buildmaster into lp:launchpad.
Commit message:
Move Builder and BuilderSet browser tests to buildmaster.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/builder-tests-to-buildmaster/+merge/270829
Move Builder and BuilderSet browser tests to buildmaster.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/builder-tests-to-buildmaster into lp:launchpad.
=== renamed file 'lib/lp/soyuz/browser/tests/test_builder.py' => 'lib/lp/buildmaster/browser/tests/test_builder.py'
--- lib/lp/soyuz/browser/tests/test_builder.py 2015-02-17 07:39:47 +0000
+++ lib/lp/buildmaster/browser/tests/test_builder.py 2015-09-11 14:19:57 +0000
@@ -8,10 +8,10 @@
from testtools.matchers import Equals
from zope.component import getUtility
+from lp.buildmaster.browser.tests.test_builder_views import BuildCreationMixin
from lp.buildmaster.enums import BuildStatus
from lp.buildmaster.interfaces.builder import IBuilderSet
from lp.services.job.model.job import Job
-from lp.soyuz.browser.tests.test_builder_views import BuildCreationMixin
from lp.testing import (
record_two_runs,
TestCaseWithFactory,
=== renamed file 'lib/lp/soyuz/browser/tests/test_builder_views.py' => 'lib/lp/buildmaster/browser/tests/test_builder_views.py'
=== added directory 'lib/lp/buildmaster/stories'
=== renamed file 'lib/lp/soyuz/browser/tests/builder-views.txt' => 'lib/lp/buildmaster/stories/builder-views.txt'
--- lib/lp/soyuz/browser/tests/builder-views.txt 2015-04-20 09:48:57 +0000
+++ lib/lp/buildmaster/stories/builder-views.txt 2015-09-11 14:19:57 +0000
@@ -6,6 +6,7 @@
... IBinaryPackageBuildSet)
>>> from lp.services.webapp.servers import LaunchpadTestRequest
+ >>> login(ANONYMOUS)
>>> builder = getUtility(IBuilderSet).get(1)
Get a "mock" request:
@@ -56,9 +57,8 @@
This page requires launchpad.Edit permission and the builder is owned
by mark. we nee to log in as mark or any other member of admin team
- >>> from lp.testing import login
+ >>> from lp.testing.views import create_initialized_view
>>> login("foo.bar@xxxxxxxxxxxxx")
-
>>> builder_view = create_initialized_view(builder, name="+edit")
>>> print builder_view.page_title
Change details for builder ...Bob The Builder...
=== renamed file 'lib/lp/soyuz/stories/soyuz/xx-builder-page.txt' => 'lib/lp/buildmaster/stories/xx-builder-page.txt'
=== renamed file 'lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt' => 'lib/lp/buildmaster/stories/xx-buildfarm-index.txt'
=== added file 'lib/lp/buildmaster/tests/test_doc.py'
--- lib/lp/buildmaster/tests/test_doc.py 1970-01-01 00:00:00 +0000
+++ lib/lp/buildmaster/tests/test_doc.py 2015-09-11 14:19:57 +0000
@@ -0,0 +1,14 @@
+# Copyright 2015 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Run pagetests."""
+
+import os
+
+from lp.services.testing import build_test_suite
+
+here = os.path.dirname(os.path.realpath(__file__))
+
+
+def test_suite():
+ return build_test_suite(here)
Follow ups