launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #30177
[Merge] ~cjwatson/launchpad:black-23.3.0 into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:black-23.3.0 into launchpad:master.
Commit message:
Upgrade to black 23.3.0
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/445882
This introduces the 2023 stable style.
--
The attached diff has been truncated due to its size.
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:black-23.3.0 into launchpad:master.
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 0f3d230..fa004e5 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -106,3 +106,5 @@ a0cc45d527f251438cff74b4134e7a66fba42ac7
9c7e734d893362de4461910d309d9891558c9634
# apply blackdoc on the complete codebase
78a72ed0e3f5be6c727f4981d6a09e978cde4b7e
+# apply black's 2023 stable style
+eca751c73eec4045cfc5bbe75058146335e83d1c
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index dab74e2..c4198d7 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -36,7 +36,7 @@ repos:
|utilities/community-contributions\.py
)$
- repo: https://github.com/psf/black
- rev: 22.12.0
+ rev: 23.3.0
hooks:
- id: black
exclude: |
diff --git a/cronscripts/update-bugzilla-remote-components.py b/cronscripts/update-bugzilla-remote-components.py
index b98b467..e002dac 100755
--- a/cronscripts/update-bugzilla-remote-components.py
+++ b/cronscripts/update-bugzilla-remote-components.py
@@ -35,7 +35,6 @@ class UpdateRemoteComponentsFromBugzilla(LaunchpadCronScript):
if __name__ == "__main__":
-
updater = UpdateRemoteComponentsFromBugzilla(
"updatebugzillaremotecomponents",
dbuser=config.updatebugzillaremotecomponents.dbuser,
diff --git a/lib/launchpad_loggerhead/app.py b/lib/launchpad_loggerhead/app.py
index b7496ae..d05e207 100644
--- a/lib/launchpad_loggerhead/app.py
+++ b/lib/launchpad_loggerhead/app.py
@@ -208,7 +208,6 @@ class RootApp:
)
lp_server.start_server()
try:
-
try:
branchfs = self.get_branchfs()
transport_type, info, trail = branchfs.translatePath(
diff --git a/lib/launchpad_loggerhead/session.py b/lib/launchpad_loggerhead/session.py
index 48d213d..45e32fe 100644
--- a/lib/launchpad_loggerhead/session.py
+++ b/lib/launchpad_loggerhead/session.py
@@ -13,7 +13,6 @@ from lp.services.config import config
class LaunchpadSecureCookie(SecureCookie):
-
# The default of sha1 is a bit too weak.
hash_method = staticmethod(hashlib.sha256)
diff --git a/lib/lp/answers/browser/person.py b/lib/lp/answers/browser/person.py
index 6d06aa1..a684d11 100644
--- a/lib/lp/answers/browser/person.py
+++ b/lib/lp/answers/browser/person.py
@@ -261,7 +261,6 @@ class PersonAnswerContactForView(LaunchpadView):
class PersonAnswersMenu(NavigationMenu):
-
usedfor = IPerson
facet = "answers"
links = [
diff --git a/lib/lp/answers/browser/tests/test_questionmessages.py b/lib/lp/answers/browser/tests/test_questionmessages.py
index 0e1bb02..0911bd6 100644
--- a/lib/lp/answers/browser/tests/test_questionmessages.py
+++ b/lib/lp/answers/browser/tests/test_questionmessages.py
@@ -19,7 +19,6 @@ from lp.testing.pages import find_tag_by_id
class TestQuestionMessageVisibility(
BrowserTestCase, TestMessageVisibilityMixin
):
-
layer = DatabaseFunctionalLayer
def makeHiddenMessage(self, comment_owner=None):
@@ -44,7 +43,6 @@ class TestQuestionMessageVisibility(
class TestHideQuestionMessageControls(
BrowserTestCase, TestHideMessageControlMixin
):
-
layer = DatabaseFunctionalLayer
control_text = "mark-spam-0"
diff --git a/lib/lp/answers/browser/tests/test_questiontarget.py b/lib/lp/answers/browser/tests/test_questiontarget.py
index b9a8bd2..24a1261 100644
--- a/lib/lp/answers/browser/tests/test_questiontarget.py
+++ b/lib/lp/answers/browser/tests/test_questiontarget.py
@@ -28,7 +28,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestSearchQuestionsView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_matching_faqs_url__handles_non_ascii(self):
@@ -65,7 +64,6 @@ class TestSearchQuestionsView(TestCaseWithFactory):
class TestSearchQuestionsViewCanConfigureAnswers(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_cannot_configure_answers_product_no_edit_permission(self):
diff --git a/lib/lp/answers/interfaces/faq.py b/lib/lp/answers/interfaces/faq.py
index 7d18c7b..42d64d1 100644
--- a/lib/lp/answers/interfaces/faq.py
+++ b/lib/lp/answers/interfaces/faq.py
@@ -35,7 +35,6 @@ class CannotDeleteFAQ(Exception):
class IFAQPublic(IHasOwner):
-
id = exported(
Int(
title=_("FAQ Number"),
diff --git a/lib/lp/answers/interfaces/questionjob.py b/lib/lp/answers/interfaces/questionjob.py
index 5700e9a..21e218f 100644
--- a/lib/lp/answers/interfaces/questionjob.py
+++ b/lib/lp/answers/interfaces/questionjob.py
@@ -49,7 +49,6 @@ class IQuestionJob(Interface):
class IQuestionEmailJob(IQuestionJob, IRunnableJob):
-
user = Attribute("The `IPerson` who triggered the email.")
subject = Attribute("The subject of the email.")
diff --git a/lib/lp/answers/model/tests/test_question.py b/lib/lp/answers/model/tests/test_question.py
index 15ec010..6040354 100644
--- a/lib/lp/answers/model/tests/test_question.py
+++ b/lib/lp/answers/model/tests/test_question.py
@@ -13,7 +13,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestQuestionDirectSubscribers(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_get_direct_subscribers(self):
@@ -63,7 +62,6 @@ class TestQuestionDirectSubscribers(TestCaseWithFactory):
class TestQuestionInDirectSubscribers(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_answerContactIsIndirectSubscriber(self):
@@ -108,7 +106,6 @@ class TestQuestionInDirectSubscribers(TestCaseWithFactory):
class TestQuestionSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_expiredQuestions(self):
diff --git a/lib/lp/answers/publisher.py b/lib/lp/answers/publisher.py
index 21d1443..6e61444 100644
--- a/lib/lp/answers/publisher.py
+++ b/lib/lp/answers/publisher.py
@@ -24,7 +24,6 @@ from lp.services.webapp.servers import (
@implementer(IFacet)
class AnswersFacet:
-
name = "answers"
rootsite = "answers"
text = "Questions"
diff --git a/lib/lp/answers/tests/test_faq.py b/lib/lp/answers/tests/test_faq.py
index 020cbaa..a50a432 100644
--- a/lib/lp/answers/tests/test_faq.py
+++ b/lib/lp/answers/tests/test_faq.py
@@ -106,7 +106,6 @@ class TestFAQPermissions(TestCaseWithFactory):
class TestFAQ(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_destroySelf(self):
diff --git a/lib/lp/answers/tests/test_faq_webservice.py b/lib/lp/answers/tests/test_faq_webservice.py
index bb69f3e..dc80564 100644
--- a/lib/lp/answers/tests/test_faq_webservice.py
+++ b/lib/lp/answers/tests/test_faq_webservice.py
@@ -13,7 +13,6 @@ from lp.testing.pages import webservice_for_person
class TestFAQWebService(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_representation(self):
diff --git a/lib/lp/answers/tests/test_question.py b/lib/lp/answers/tests/test_question.py
index 8e22dbd..29adfe5 100644
--- a/lib/lp/answers/tests/test_question.py
+++ b/lib/lp/answers/tests/test_question.py
@@ -19,7 +19,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestQuestionSecurity(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_title_and_description_writes(self):
diff --git a/lib/lp/answers/tests/test_question_webservice.py b/lib/lp/answers/tests/test_question_webservice.py
index a5735b2..9378638 100644
--- a/lib/lp/answers/tests/test_question_webservice.py
+++ b/lib/lp/answers/tests/test_question_webservice.py
@@ -275,7 +275,6 @@ class TestSetCommentVisibility(TestCaseWithFactory):
class TestQuestionWebServiceSubscription(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_subscribe(self):
@@ -325,7 +324,6 @@ class TestQuestionWebServiceSubscription(TestCaseWithFactory):
class TestQuestionSetWebService(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_searchQuestions(self):
diff --git a/lib/lp/answers/tests/test_question_workflow.py b/lib/lp/answers/tests/test_question_workflow.py
index 733e24e..c0e61ce 100644
--- a/lib/lp/answers/tests/test_question_workflow.py
+++ b/lib/lp/answers/tests/test_question_workflow.py
@@ -612,6 +612,7 @@ class LinkFAQTestCase(BaseAnswerTrackerWorkflowTestCase):
one of OPEN, NEEDSINFO or ANSWERED and check that it returns a
valid IQuestionMessage.
"""
+
# Do not check the edited_fields attributes since it
# changes based on departure state.
def checkFAQ(message):
diff --git a/lib/lp/answers/tests/test_questionjob.py b/lib/lp/answers/tests/test_questionjob.py
index 214b83a..f639cc1 100644
--- a/lib/lp/answers/tests/test_questionjob.py
+++ b/lib/lp/answers/tests/test_questionjob.py
@@ -372,7 +372,6 @@ class QuestionEmailJobTestCase(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_run(self):
diff --git a/lib/lp/app/browser/launchpad.py b/lib/lp/app/browser/launchpad.py
index a4eba0a..25b5c11 100644
--- a/lib/lp/app/browser/launchpad.py
+++ b/lib/lp/app/browser/launchpad.py
@@ -565,7 +565,6 @@ class MaintenanceMessage:
class LaunchpadRootFacets(StandardLaunchpadFacets):
-
usedfor = ILaunchpadRoot
enable_only = [
"overview",
@@ -689,7 +688,6 @@ class LoginStatus:
class LaunchpadRootNavigation(Navigation):
-
usedfor = ILaunchpadRoot
@stepto("support")
@@ -1185,7 +1183,6 @@ class IAppFrontPageSearchForm(Interface):
class AppFrontPageSearchView(LaunchpadFormView):
-
schema = IAppFrontPageSearchForm
custom_widget_scope = ProjectScopeWidget
diff --git a/lib/lp/app/browser/launchpadform.py b/lib/lp/app/browser/launchpadform.py
index 3578008..119bace 100644
--- a/lib/lp/app/browser/launchpadform.py
+++ b/lib/lp/app/browser/launchpadform.py
@@ -57,7 +57,6 @@ _first_widget_marker = object()
class LaunchpadFormView(LaunchpadView):
-
# The prefix used for all form inputs.
prefix = "field"
@@ -472,7 +471,6 @@ class LaunchpadFormView(LaunchpadView):
class LaunchpadEditFormView(LaunchpadFormView):
-
render_context = True
def updateContextFromData(self, data, context=None, notify_modified=True):
diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
index 44781e8..b8584c9 100644
--- a/lib/lp/app/browser/tales.py
+++ b/lib/lp/app/browser/tales.py
@@ -1053,7 +1053,6 @@ class SpecificationImageDisplayAPI(ObjectImageDisplayAPI):
return '<span class="%s"></span>' % self.sprite_css()
def badges(self):
-
badges = ""
if len(self._context.linked_branches) > 0:
@@ -1778,7 +1777,6 @@ class BranchSubscriptionFormatterAPI(CustomizableFormatter):
class BranchMergeProposalFormatterAPI(CustomizableFormatter):
-
_link_summary_template = _("%(title)s")
def _link_summary_values(self):
@@ -1858,7 +1856,6 @@ class BugTaskFormatterAPI(CustomizableFormatter):
class BugAttachmentFormatterAPI(CustomizableFormatter):
-
final_traversable_names = dict(
**CustomizableFormatter.final_traversable_names,
attachment_link="attachment_link",
diff --git a/lib/lp/app/browser/tests/test_css_formatter.py b/lib/lp/app/browser/tests/test_css_formatter.py
index c60af07..0cade3f 100644
--- a/lib/lp/app/browser/tests/test_css_formatter.py
+++ b/lib/lp/app/browser/tests/test_css_formatter.py
@@ -10,7 +10,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestCSSFormatter(TestCase):
-
layer = DatabaseFunctionalLayer
def test_select(self):
diff --git a/lib/lp/app/browser/tests/test_formatters.py b/lib/lp/app/browser/tests/test_formatters.py
index b659677..c7eab52 100644
--- a/lib/lp/app/browser/tests/test_formatters.py
+++ b/lib/lp/app/browser/tests/test_formatters.py
@@ -11,7 +11,6 @@ from lp.testing.views import create_view
class ObjectFormatterAPITestCase(TestCaseWithFactory, FakeAdapterMixin):
-
layer = DatabaseFunctionalLayer
def test_pagetitle_top_level(self):
@@ -109,7 +108,6 @@ class ObjectFormatterAPITestCase(TestCaseWithFactory, FakeAdapterMixin):
class TestPillarFormatterAPI(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
FORMATTER_CSS_CLASS = "sprite product"
diff --git a/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py b/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py
index c6fe5c9..4411353 100644
--- a/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py
+++ b/lib/lp/app/browser/tests/test_inlineeditpickerwidget.py
@@ -15,7 +15,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestInlineEditPickerWidget(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getWidget(self, **kwargs):
@@ -65,7 +64,6 @@ class TestInlineEditPickerWidget(TestCaseWithFactory):
class TestInlinePersonEditPickerWidget(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getWidget(self, widget_value, show_create_team=False, **kwargs):
diff --git a/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py b/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py
index 3222fa4..205640d 100644
--- a/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py
+++ b/lib/lp/app/browser/tests/test_inlinemulticheckboxwidget.py
@@ -25,7 +25,6 @@ class Alphabet(EnumeratedType):
class TestInlineMultiCheckboxWidget(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def _getWidget(self, **kwargs):
diff --git a/lib/lp/app/browser/tests/test_launchpad.py b/lib/lp/app/browser/tests/test_launchpad.py
index 72605c3..e7cd7d9 100644
--- a/lib/lp/app/browser/tests/test_launchpad.py
+++ b/lib/lp/app/browser/tests/test_launchpad.py
@@ -347,7 +347,6 @@ class TestBranchTraversal(TestCaseWithFactory, TraversalMixin):
class TestCodeTraversal(TestCaseWithFactory, TraversalMixin):
-
layer = DatabaseFunctionalLayer
def traverse(self, path, **kwargs):
@@ -606,7 +605,6 @@ class TestCodeTraversal(TestCaseWithFactory, TraversalMixin):
class TestPersonTraversal(TestCaseWithFactory, TraversalMixin):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -720,7 +718,6 @@ class TestPersonTraversal(TestCaseWithFactory, TraversalMixin):
class TestErrorViews(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_GoneError(self):
@@ -731,7 +728,6 @@ class TestErrorViews(TestCaseWithFactory):
class ExceptionHierarchyTestCase(TestCaseWithFactory):
-
layer = FunctionalLayer
def test_exception(self):
@@ -751,7 +747,6 @@ class ExceptionHierarchyTestCase(TestCaseWithFactory):
class TestIterViewRegistrations(TestCaseWithFactory):
-
layer = FunctionalLayer
def test_iter_view_registrations(self):
@@ -765,7 +760,6 @@ class TestIterViewRegistrations(TestCaseWithFactory):
class TestProductTraversal(TestCaseWithFactory, TraversalMixin):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/app/browser/tests/test_launchpadform.py b/lib/lp/app/browser/tests/test_launchpadform.py
index 7ca3863..ff3aea2 100644
--- a/lib/lp/app/browser/tests/test_launchpadform.py
+++ b/lib/lp/app/browser/tests/test_launchpadform.py
@@ -38,7 +38,6 @@ class TestView(LaunchpadFormView):
class TestHasStructuredDoc(TestCase):
-
layer = FunctionalLayer
def _widget_annotation(self, widget):
@@ -55,7 +54,6 @@ class TestHasStructuredDoc(TestCase):
class TestQueryTalesForHasStructuredDoc(TestCase):
-
layer = FunctionalLayer
def test_query_tales(self):
@@ -102,7 +100,6 @@ class TestHelpLinksView(LaunchpadFormView):
class TestHelpLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_help_links_on_widget(self):
diff --git a/lib/lp/app/browser/tests/test_launchpadform_doc.py b/lib/lp/app/browser/tests/test_launchpadform_doc.py
index 5e679ab..461df86 100644
--- a/lib/lp/app/browser/tests/test_launchpadform_doc.py
+++ b/lib/lp/app/browser/tests/test_launchpadform_doc.py
@@ -17,7 +17,6 @@ from lp.testing.layers import FunctionalLayer
class LaunchpadFormTest(unittest.TestCase):
-
layer = FunctionalLayer
def test_formLayout(self):
diff --git a/lib/lp/app/browser/tests/test_launchpadroot.py b/lib/lp/app/browser/tests/test_launchpadroot.py
index c5e5329..85faf0a 100644
--- a/lib/lp/app/browser/tests/test_launchpadroot.py
+++ b/lib/lp/app/browser/tests/test_launchpadroot.py
@@ -127,7 +127,6 @@ class TestLaunchpadRootNavigation(TestCaseWithFactory):
class LaunchpadRootIndexViewTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/app/browser/tests/test_linkchecker.py b/lib/lp/app/browser/tests/test_linkchecker.py
index 0215c41..f1b2fe9 100644
--- a/lib/lp/app/browser/tests/test_linkchecker.py
+++ b/lib/lp/app/browser/tests/test_linkchecker.py
@@ -16,7 +16,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestLinkCheckerAPI(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
BRANCH_URL_TEMPLATE = "/+code/%s"
diff --git a/lib/lp/app/browser/tests/test_stringformatter.py b/lib/lp/app/browser/tests/test_stringformatter.py
index d8f556e..78a332f 100644
--- a/lib/lp/app/browser/tests/test_stringformatter.py
+++ b/lib/lp/app/browser/tests/test_stringformatter.py
@@ -167,7 +167,6 @@ class TestLinkifyingBugs(TestCase):
class TestLinkifyingProtocols(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_normal_set(self):
@@ -484,7 +483,6 @@ class TestParseDiff(TestCase):
class TestParseDiffErrors(TestCaseWithFactory):
-
layer = ZopelessLayer
def assertParses(self, expected, diff):
diff --git a/lib/lp/app/browser/tests/test_vocabulary.py b/lib/lp/app/browser/tests/test_vocabulary.py
index c827743..81f80cf 100644
--- a/lib/lp/app/browser/tests/test_vocabulary.py
+++ b/lib/lp/app/browser/tests/test_vocabulary.py
@@ -44,7 +44,6 @@ def get_picker_entry(item_subject, context_object, **kwargs):
class DefaultPickerEntrySourceAdapterTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_css_image_entry_without_icon(self):
@@ -74,7 +73,6 @@ class DefaultPickerEntrySourceAdapterTestCase(TestCaseWithFactory):
class PersonPickerEntrySourceAdapterTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_person_to_pickerentry(self):
@@ -190,7 +188,6 @@ class PersonPickerEntrySourceAdapterTestCase(TestCaseWithFactory):
class TestDistributionSourcePackagePickerEntrySourceAdapter(
TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def getPickerEntry(self, dsp):
@@ -270,7 +267,6 @@ class TestDistributionSourcePackagePickerEntrySourceAdapter(
class TestProductPickerEntrySourceAdapter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getPickerEntry(self, product):
@@ -352,7 +348,6 @@ class TestProductPickerEntrySourceAdapter(TestCaseWithFactory):
class TestProjectGroupPickerEntrySourceAdapter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getPickerEntry(self, projectgroup):
@@ -410,7 +405,6 @@ class TestProjectGroupPickerEntrySourceAdapter(TestCaseWithFactory):
class TestDistributionPickerEntrySourceAdapter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getPickerEntry(self, distribution):
@@ -544,7 +538,6 @@ class TestVocabularyFilter(VocabularyFilter):
class HugeVocabularyJSONViewTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/app/browser/tests/test_webservice.py b/lib/lp/app/browser/tests/test_webservice.py
index b1f72ad..2defa9d 100644
--- a/lib/lp/app/browser/tests/test_webservice.py
+++ b/lib/lp/app/browser/tests/test_webservice.py
@@ -15,7 +15,6 @@ from lp.testing.pages import LaunchpadWebServiceCaller
class TestXHTMLRepresentations(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_person(self):
diff --git a/lib/lp/app/browser/vocabulary.py b/lib/lp/app/browser/vocabulary.py
index 04d0599..0d0283f 100644
--- a/lib/lp/app/browser/vocabulary.py
+++ b/lib/lp/app/browser/vocabulary.py
@@ -377,7 +377,6 @@ class ProductPickerEntrySourceAdapter(TargetPickerEntrySourceAdapter):
@adapter(IDistribution)
class DistributionPickerEntrySourceAdapter(TargetPickerEntrySourceAdapter):
-
target_type = "distribution"
def getMaintainer(self, target):
diff --git a/lib/lp/app/interfaces/informationtype.py b/lib/lp/app/interfaces/informationtype.py
index 5ea95df..29bc077 100644
--- a/lib/lp/app/interfaces/informationtype.py
+++ b/lib/lp/app/interfaces/informationtype.py
@@ -14,7 +14,6 @@ from lp.app.interfaces.launchpad import IPrivacy
class IInformationType(IPrivacy):
-
information_type = exported(
Choice(
title=_("Information Type"),
diff --git a/lib/lp/app/tests/test_launchpad.py b/lib/lp/app/tests/test_launchpad.py
index 506f6ab..5a47167 100644
--- a/lib/lp/app/tests/test_launchpad.py
+++ b/lib/lp/app/tests/test_launchpad.py
@@ -16,7 +16,6 @@ from lp.testing.layers import FunctionalLayer
class PrivacyTestCase(TestCase):
-
layer = FunctionalLayer
def test_init(self):
@@ -29,7 +28,6 @@ class PrivacyTestCase(TestCase):
class ExceptionPrivacyTestCase(TestCase):
-
layer = FunctionalLayer
def test_exception(self):
diff --git a/lib/lp/app/tests/test_security.py b/lib/lp/app/tests/test_security.py
index 384fda1..0f70c4f 100644
--- a/lib/lp/app/tests/test_security.py
+++ b/lib/lp/app/tests/test_security.py
@@ -47,7 +47,6 @@ class Fake:
class TestAuthorizationBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_checkAuthenticated_for_full_fledged_account(self):
diff --git a/lib/lp/app/tests/test_services.py b/lib/lp/app/tests/test_services.py
index 76ac515..f84bbda 100644
--- a/lib/lp/app/tests/test_services.py
+++ b/lib/lp/app/tests/test_services.py
@@ -25,7 +25,6 @@ class IFakeService(IService):
@implementer(IFakeService, IHTTPResource)
class FakeService:
-
name = "fake_service"
diff --git a/lib/lp/app/tests/test_yuitests.py b/lib/lp/app/tests/test_yuitests.py
index 1f8537f..cfa0a8e 100644
--- a/lib/lp/app/tests/test_yuitests.py
+++ b/lib/lp/app/tests/test_yuitests.py
@@ -11,7 +11,6 @@ __all__ = [] # type: List[str]
class AppYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "AppYUIUnitTests"
diff --git a/lib/lp/app/validators/tests/test_validation.py b/lib/lp/app/validators/tests/test_validation.py
index 3b14319..6d5c31c 100644
--- a/lib/lp/app/validators/tests/test_validation.py
+++ b/lib/lp/app/validators/tests/test_validation.py
@@ -9,7 +9,6 @@ from lp.testing.layers import BaseLayer
class TestOCIBranchValidator(TestCase):
-
layer = BaseLayer
def test_validate_oci_branch_name_with_leading_slash(self):
diff --git a/lib/lp/app/webservice/tests/test_marshallers.py b/lib/lp/app/webservice/tests/test_marshallers.py
index cd5def4..006a1bd 100644
--- a/lib/lp/app/webservice/tests/test_marshallers.py
+++ b/lib/lp/app/webservice/tests/test_marshallers.py
@@ -29,7 +29,6 @@ def ws_url(bug):
class TestTextFieldMarshaller(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_unmarshall_obfuscated(self):
@@ -138,7 +137,6 @@ class TestWebServiceObfuscation(TestCaseWithFactory):
class IInlineExample(Interface):
-
person = PersonChoice(vocabulary="ValidPersonOrTeam")
status = Choice(vocabulary=JobStatus)
@@ -158,7 +156,6 @@ def inline_example_from_dict(template):
class TestInlineObjectFieldMarshaller(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_unmarshall(self):
diff --git a/lib/lp/app/widgets/date.py b/lib/lp/app/widgets/date.py
index ce27881..a54e85f 100644
--- a/lib/lp/app/widgets/date.py
+++ b/lib/lp/app/widgets/date.py
@@ -364,7 +364,7 @@ class DateTimeWidget(TextWidget):
for fmt in self.supported_input_formats:
try:
datetime.strptime(input.strip(), fmt)
- except (ValueError) as e:
+ except ValueError as e:
if "unconverted data remains" in str(e):
return
else:
diff --git a/lib/lp/app/widgets/popup.py b/lib/lp/app/widgets/popup.py
index b2524ef..0f443f0 100644
--- a/lib/lp/app/widgets/popup.py
+++ b/lib/lp/app/widgets/popup.py
@@ -243,7 +243,6 @@ class VocabularyPickerWidget(SingleDataHelper, ItemsWidgetBase):
class PersonPickerWidget(VocabularyPickerWidget):
-
show_assign_me_button = True
show_remove_button = False
picker_type = "person"
@@ -267,7 +266,6 @@ class PersonPickerWidget(VocabularyPickerWidget):
class BugTrackerPickerWidget(VocabularyPickerWidget):
-
__call__ = ViewPageTemplateFile("templates/bugtracker-picker.pt")
link_template = """
or (<a id="create-bugtracker-link"
diff --git a/lib/lp/app/widgets/tests/test_datetime.py b/lib/lp/app/widgets/tests/test_datetime.py
index a6b39e9..0ae5ab8 100644
--- a/lib/lp/app/widgets/tests/test_datetime.py
+++ b/lib/lp/app/widgets/tests/test_datetime.py
@@ -13,7 +13,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestDateTimeWidget(TestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/app/widgets/tests/test_itemswidgets.py b/lib/lp/app/widgets/tests/test_itemswidgets.py
index 57bdae9..4a604b9 100644
--- a/lib/lp/app/widgets/tests/test_itemswidgets.py
+++ b/lib/lp/app/widgets/tests/test_itemswidgets.py
@@ -278,7 +278,6 @@ class TestEnumChoiceWidget(TestCaseWithFactory):
layer = DatabaseFunctionalLayer
class ChoiceEnum(DBEnumeratedType):
-
ITEM_A = DBItem(
1,
"""
diff --git a/lib/lp/app/widgets/tests/test_popup.py b/lib/lp/app/widgets/tests/test_popup.py
index 0a4ce99..214e3a1 100644
--- a/lib/lp/app/widgets/tests/test_popup.py
+++ b/lib/lp/app/widgets/tests/test_popup.py
@@ -44,7 +44,6 @@ class ITest(Interface, metaclass=TestMetaClass):
class TestVocabularyPickerWidget(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/archivepublisher/customupload.py b/lib/lp/archivepublisher/customupload.py
index 533e488..2759c2f 100644
--- a/lib/lp/archivepublisher/customupload.py
+++ b/lib/lp/archivepublisher/customupload.py
@@ -315,7 +315,6 @@ class CustomUpload:
assert self.tmpdir is not None, "Must extract tarfile first"
extracted = False
for dirpath, dirnames, filenames in os.walk(self.tmpdir):
-
# Create symbolic links to directories.
for dirname in dirnames:
sourcepath, basepath, destpath = self._buildInstallPaths(
diff --git a/lib/lp/archivepublisher/debversion.py b/lib/lp/archivepublisher/debversion.py
index ddbecd9..cd409b4 100644
--- a/lib/lp/archivepublisher/debversion.py
+++ b/lib/lp/archivepublisher/debversion.py
@@ -55,7 +55,6 @@ class Version(changelog.Version):
"""
def __init__(self, ver):
-
ver = str(ver)
if not len(ver):
raise BadInputError("Input cannot be empty")
diff --git a/lib/lp/archivepublisher/model/ftparchive.py b/lib/lp/archivepublisher/model/ftparchive.py
index a891a85..ba801ae 100644
--- a/lib/lp/archivepublisher/model/ftparchive.py
+++ b/lib/lp/archivepublisher/model/ftparchive.py
@@ -889,7 +889,6 @@ class FTPArchiveHandler:
# each of the distroseries we've touched
for distroseries in self.distro.series:
for pocket in PackagePublishingPocket.items:
-
if not fullpublish:
if not self.publisher.isDirty(distroseries, pocket):
self.log.debug(
diff --git a/lib/lp/archivepublisher/publishing.py b/lib/lp/archivepublisher/publishing.py
index 105a393..8eee4ed 100644
--- a/lib/lp/archivepublisher/publishing.py
+++ b/lib/lp/archivepublisher/publishing.py
@@ -1882,10 +1882,10 @@ class DirectoryHash:
]
with open(path, "rb") as in_file:
for chunk in iter(lambda: in_file.read(256 * 1024), b""):
- for (checksum_file, hashobj) in hashes:
+ for checksum_file, hashobj in hashes:
hashobj.update(chunk)
- for (checksum_file, hashobj) in hashes:
+ for checksum_file, hashobj in hashes:
checksum_line = "%s *%s\n" % (
hashobj.hexdigest(),
path[len(self.root) + 1 :],
@@ -1899,5 +1899,5 @@ class DirectoryHash:
self.add(os.path.join(dirpath, filename))
def close(self):
- for (checksum_path, checksum_file, archive_hash) in self.checksum_hash:
+ for checksum_path, checksum_file, archive_hash in self.checksum_hash:
checksum_file.close()
diff --git a/lib/lp/archivepublisher/scripts/copy_signingkeys.py b/lib/lp/archivepublisher/scripts/copy_signingkeys.py
index 018b7aa..54b829b 100644
--- a/lib/lp/archivepublisher/scripts/copy_signingkeys.py
+++ b/lib/lp/archivepublisher/scripts/copy_signingkeys.py
@@ -20,7 +20,6 @@ from lp.soyuz.interfaces.archive import IArchiveSet
class CopySigningKeysScript(LaunchpadScript):
-
usage = "Usage: %prog [options] FROM_ARCHIVE TO_ARCHIVE"
description = "Copy signing keys between archives."
diff --git a/lib/lp/archivepublisher/scripts/generate_contents_files.py b/lib/lp/archivepublisher/scripts/generate_contents_files.py
index e4c25e5..bd4f5e3 100644
--- a/lib/lp/archivepublisher/scripts/generate_contents_files.py
+++ b/lib/lp/archivepublisher/scripts/generate_contents_files.py
@@ -99,7 +99,6 @@ def execute(logger, command, args=None):
class GenerateContentsFiles(LaunchpadCronScript):
-
distribution = None
def add_my_options(self):
diff --git a/lib/lp/archivepublisher/scripts/processaccepted.py b/lib/lp/archivepublisher/scripts/processaccepted.py
index 10f90f7..da27fb9 100644
--- a/lib/lp/archivepublisher/scripts/processaccepted.py
+++ b/lib/lp/archivepublisher/scripts/processaccepted.py
@@ -128,7 +128,6 @@ class ProcessAccepted(PublisherScript):
)
try:
for distroseries in distribution.series:
-
self.logger.debug(
"Processing queue for %s %s"
% (archive.reference, distroseries.name)
diff --git a/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py b/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
index e4832f4..e51077a 100644
--- a/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
+++ b/lib/lp/archivepublisher/tests/test_archivegpgsigningkey.py
@@ -50,7 +50,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestSignableArchiveWithSigningKey(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
@@ -223,7 +222,6 @@ class TestSignableArchiveWithSigningKey(TestCaseWithFactory):
class TestSignableArchiveWithRunParts(RunPartsMixin, TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -352,7 +350,6 @@ class TestSignableArchiveWithRunParts(RunPartsMixin, TestCaseWithFactory):
class TestArchiveGPGSigningKey(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
# treq.content doesn't close the connection before yielding control back
# to the test, so we need to spin the reactor at the end to finish
diff --git a/lib/lp/archivepublisher/tests/test_artifactory.py b/lib/lp/archivepublisher/tests/test_artifactory.py
index d91898e..d13a92d 100644
--- a/lib/lp/archivepublisher/tests/test_artifactory.py
+++ b/lib/lp/archivepublisher/tests/test_artifactory.py
@@ -69,7 +69,6 @@ class ArtifactoryPoolTestingFile(PoolTestingFile):
class TestArtifactoryPool(TestCase):
-
layer = BaseLayer
def setUp(self):
@@ -492,7 +491,6 @@ class TestArtifactoryPool(TestCase):
class TestArtifactoryPoolFromLibrarian(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/archivepublisher/tests/test_config.py b/lib/lp/archivepublisher/tests/test_config.py
index dd85b75..a25accd 100644
--- a/lib/lp/archivepublisher/tests/test_config.py
+++ b/lib/lp/archivepublisher/tests/test_config.py
@@ -27,7 +27,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestGetPubConfig(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -143,7 +142,6 @@ class TestGetPubConfig(TestCaseWithFactory):
class TestGetPubConfigPPA(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -252,7 +250,6 @@ class TestGetPubConfigPPA(TestCaseWithFactory):
class TestGetPubConfigPPACompatUefi(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -275,7 +272,6 @@ class TestGetPubConfigPPACompatUefi(TestCaseWithFactory):
class TestGetPubConfigPPARepositoryFormatPython(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/archivepublisher/tests/test_copy_signingkeys.py b/lib/lp/archivepublisher/tests/test_copy_signingkeys.py
index a31e85e..a2d5364 100644
--- a/lib/lp/archivepublisher/tests/test_copy_signingkeys.py
+++ b/lib/lp/archivepublisher/tests/test_copy_signingkeys.py
@@ -21,7 +21,6 @@ from lp.testing.script import run_script
class TestCopySigningKeysScript(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def makeScript(self, test_args=None, archives=None, expect_exit=False):
diff --git a/lib/lp/archivepublisher/tests/test_customupload.py b/lib/lp/archivepublisher/tests/test_customupload.py
index f077874..7a22882 100644
--- a/lib/lp/archivepublisher/tests/test_customupload.py
+++ b/lib/lp/archivepublisher/tests/test_customupload.py
@@ -216,7 +216,6 @@ class TestTarfileVerification(TestCase):
class TestSigning(TestCaseWithFactory, RunPartsMixin):
-
layer = LaunchpadZopelessLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
diff --git a/lib/lp/archivepublisher/tests/test_ddtp_tarball.py b/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
index 873d22f..f2c4812 100644
--- a/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
+++ b/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
@@ -21,7 +21,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestDdtpTarball(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/archivepublisher/tests/test_deathrow.py b/lib/lp/archivepublisher/tests/test_deathrow.py
index 77bcf8b..f2d9ff1 100644
--- a/lib/lp/archivepublisher/tests/test_deathrow.py
+++ b/lib/lp/archivepublisher/tests/test_deathrow.py
@@ -20,7 +20,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestDeathRow(TestCase):
-
layer = LaunchpadZopelessLayer
def getTestPublisher(self, distroseries):
diff --git a/lib/lp/archivepublisher/tests/test_debian_installer.py b/lib/lp/archivepublisher/tests/test_debian_installer.py
index a41785e..b04619c 100644
--- a/lib/lp/archivepublisher/tests/test_debian_installer.py
+++ b/lib/lp/archivepublisher/tests/test_debian_installer.py
@@ -28,7 +28,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestDebianInstaller(RunPartsMixin, TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/archivepublisher/tests/test_dist_upgrader.py b/lib/lp/archivepublisher/tests/test_dist_upgrader.py
index 1584d60..ace7cdb 100644
--- a/lib/lp/archivepublisher/tests/test_dist_upgrader.py
+++ b/lib/lp/archivepublisher/tests/test_dist_upgrader.py
@@ -31,7 +31,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestDistUpgrader(RunPartsMixin, TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/archivepublisher/tests/test_dominator.py b/lib/lp/archivepublisher/tests/test_dominator.py
index e689f3c..7c9e7ad 100644
--- a/lib/lp/archivepublisher/tests/test_dominator.py
+++ b/lib/lp/archivepublisher/tests/test_dominator.py
@@ -939,7 +939,6 @@ def jumble(ordered_list):
class TestDominatorMethods(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def makeDominator(self, publications):
diff --git a/lib/lp/archivepublisher/tests/test_indices.py b/lib/lp/archivepublisher/tests/test_indices.py
index e1dcfda..1397ffd 100644
--- a/lib/lp/archivepublisher/tests/test_indices.py
+++ b/lib/lp/archivepublisher/tests/test_indices.py
@@ -39,7 +39,6 @@ def get_field(stanza_fields, name):
class TestNativeArchiveIndexes(TestNativePublishingBase):
-
deb_md5 = "008409e7feb1c24a6ccab9f6a62d24c5"
deb_sha1 = "30b7b4e583fa380772c5a40e428434628faef8cf"
deb_sha256 = (
diff --git a/lib/lp/archivepublisher/tests/test_meta_data.py b/lib/lp/archivepublisher/tests/test_meta_data.py
index f3a93ba..e7beb8f 100644
--- a/lib/lp/archivepublisher/tests/test_meta_data.py
+++ b/lib/lp/archivepublisher/tests/test_meta_data.py
@@ -18,7 +18,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestMetaData(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_ubuntu_ppa(self):
diff --git a/lib/lp/archivepublisher/tests/test_pool.py b/lib/lp/archivepublisher/tests/test_pool.py
index 1329e34..64e0890 100644
--- a/lib/lp/archivepublisher/tests/test_pool.py
+++ b/lib/lp/archivepublisher/tests/test_pool.py
@@ -72,7 +72,6 @@ class FakePackageRelease:
class FakeReleaseType(EnumeratedType):
-
SOURCE = Item("Source")
BINARY = Item("Binary")
diff --git a/lib/lp/archivepublisher/tests/test_processaccepted.py b/lib/lp/archivepublisher/tests/test_processaccepted.py
index 96afe95..34c459e 100644
--- a/lib/lp/archivepublisher/tests/test_processaccepted.py
+++ b/lib/lp/archivepublisher/tests/test_processaccepted.py
@@ -26,7 +26,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestProcessAccepted(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
dbuser = config.uploadqueue.dbuser
@@ -175,7 +174,6 @@ class TestProcessAccepted(TestCaseWithFactory):
]
class UploadCheckingSynchronizer:
-
commit_count = 0
def beforeCompletion(inner_self, txn):
diff --git a/lib/lp/archivepublisher/tests/test_publisherconfig.py b/lib/lp/archivepublisher/tests/test_publisherconfig.py
index 4907178..7966d8b 100644
--- a/lib/lp/archivepublisher/tests/test_publisherconfig.py
+++ b/lib/lp/archivepublisher/tests/test_publisherconfig.py
@@ -70,7 +70,6 @@ class TestPublisherConfig(TestCaseWithFactory):
class TestPublisherConfigSecurity(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_only_admin(self):
diff --git a/lib/lp/archivepublisher/tests/test_rosetta_translations.py b/lib/lp/archivepublisher/tests/test_rosetta_translations.py
index ea41b4c..1d8fca7 100644
--- a/lib/lp/archivepublisher/tests/test_rosetta_translations.py
+++ b/lib/lp/archivepublisher/tests/test_rosetta_translations.py
@@ -40,7 +40,6 @@ from lp.translations.model.translationpackagingjob import (
class TestRosettaTranslations(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makeTranslationsLFA(self, tar_content=None, filename=None):
diff --git a/lib/lp/archivepublisher/tests/test_signing.py b/lib/lp/archivepublisher/tests/test_signing.py
index 696053d..547c02f 100644
--- a/lib/lp/archivepublisher/tests/test_signing.py
+++ b/lib/lp/archivepublisher/tests/test_signing.py
@@ -183,7 +183,6 @@ class FakeMethodCallLog(FakeMethod):
class TestSigningHelpers(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
diff --git a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
index 05a0d24..bf5a5a2 100644
--- a/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
+++ b/lib/lp/archivepublisher/tests/test_sync_signingkeys.py
@@ -52,7 +52,6 @@ from lp.testing.script import run_script
class TestSyncSigningKeysScript(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
diff --git a/lib/lp/archivepublisher/utils.py b/lib/lp/archivepublisher/utils.py
index 6156c2c..18d5f03 100644
--- a/lib/lp/archivepublisher/utils.py
+++ b/lib/lp/archivepublisher/utils.py
@@ -37,7 +37,6 @@ def get_ppa_reference(ppa):
class PlainTempFile:
-
# Enumerated identifier.
compression_type = IndexCompressionType.UNCOMPRESSED
# Filename suffix.
diff --git a/lib/lp/archiveuploader/nascentuploadfile.py b/lib/lp/archiveuploader/nascentuploadfile.py
index c7773f0..01b2243 100644
--- a/lib/lp/archiveuploader/nascentuploadfile.py
+++ b/lib/lp/archiveuploader/nascentuploadfile.py
@@ -545,7 +545,6 @@ class BaseBinaryUploadFile(PackageUploadFile):
policy,
logger,
):
-
PackageUploadFile.__init__(
self,
filepath,
diff --git a/lib/lp/archiveuploader/tests/test_buildinfofile.py b/lib/lp/archiveuploader/tests/test_buildinfofile.py
index b54e4e4..acd0d02 100644
--- a/lib/lp/archiveuploader/tests/test_buildinfofile.py
+++ b/lib/lp/archiveuploader/tests/test_buildinfofile.py
@@ -14,7 +14,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestBuildInfoFile(PackageUploadFileTestCase):
-
layer = LaunchpadZopelessLayer
def getBaseBuildInfo(self):
@@ -54,7 +53,7 @@ class TestBuildInfoFile(PackageUploadFileTestCase):
def test_properties(self):
buildinfo = self.getBaseBuildInfo()
changes = self.getBaseChanges()
- for (arch, is_sourceful, is_binaryful, is_archindep) in (
+ for arch, is_sourceful, is_binaryful, is_archindep in (
("source", True, False, False),
("all", False, True, True),
("i386", False, True, False),
diff --git a/lib/lp/archiveuploader/tests/test_changesfile.py b/lib/lp/archiveuploader/tests/test_changesfile.py
index 16a4c42..067b6bf 100644
--- a/lib/lp/archiveuploader/tests/test_changesfile.py
+++ b/lib/lp/archiveuploader/tests/test_changesfile.py
@@ -426,7 +426,6 @@ class ChangesFileTests(TestCase):
class TestSignatureVerification(TestCase):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/archiveuploader/tests/test_dscfile.py b/lib/lp/archiveuploader/tests/test_dscfile.py
index 23a15ca..e2ddeaf 100644
--- a/lib/lp/archiveuploader/tests/test_dscfile.py
+++ b/lib/lp/archiveuploader/tests/test_dscfile.py
@@ -119,7 +119,6 @@ class FakeChangesFile:
class TestDSCFileWithDatabase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_checkFiles_verifies_additional_hashes(self):
@@ -312,7 +311,6 @@ class BaseTestSourceFileVerification(TestCase):
class Test10SourceFormatVerification(BaseTestSourceFileVerification):
-
format = SourcePackageFormat.FORMAT_1_0
wrong_files_error = (
@@ -378,7 +376,6 @@ class Test10SourceFormatVerification(BaseTestSourceFileVerification):
class Test30QuiltSourceFormatVerification(BaseTestSourceFileVerification):
-
format = SourcePackageFormat.FORMAT_3_0_QUILT
wrong_files_error = (
@@ -428,7 +425,6 @@ class Test30QuiltSourceFormatVerification(BaseTestSourceFileVerification):
class Test30NativeSourceFormatVerification(BaseTestSourceFileVerification):
-
format = SourcePackageFormat.FORMAT_3_0_NATIVE
wrong_files_error = "foo_1.dsc: must have only a tar.*."
diff --git a/lib/lp/archiveuploader/tests/test_nascentupload.py b/lib/lp/archiveuploader/tests/test_nascentupload.py
index 0667e31..4047317 100644
--- a/lib/lp/archiveuploader/tests/test_nascentupload.py
+++ b/lib/lp/archiveuploader/tests/test_nascentupload.py
@@ -120,7 +120,6 @@ class TestOverrideDDEBs(TestMatchDDEBs):
class TestNascentUpload(TestCase):
-
layer = ZopelessDatabaseLayer
def test_hash_mismatch_rejects(self):
diff --git a/lib/lp/archiveuploader/tests/test_nascentuploadfile.py b/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
index 6ddfadc..0de2157 100644
--- a/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
+++ b/lib/lp/archiveuploader/tests/test_nascentuploadfile.py
@@ -79,7 +79,6 @@ class NascentUploadFileTestCase(TestCaseWithFactory):
class TestNascentUploadFile(NascentUploadFileTestCase):
-
layer = ZopelessDatabaseLayer
def test_checkSizeAndCheckSum_validates_size(self):
diff --git a/lib/lp/archiveuploader/tests/test_private_maintainers.py b/lib/lp/archiveuploader/tests/test_private_maintainers.py
index 7576d2c..00cf378 100644
--- a/lib/lp/archiveuploader/tests/test_private_maintainers.py
+++ b/lib/lp/archiveuploader/tests/test_private_maintainers.py
@@ -9,7 +9,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestPrivateMaintainers(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_private_team_maintainer(self):
diff --git a/lib/lp/archiveuploader/tests/test_sync_notification.py b/lib/lp/archiveuploader/tests/test_sync_notification.py
index 7e5ca9f..e1fd5ee 100644
--- a/lib/lp/archiveuploader/tests/test_sync_notification.py
+++ b/lib/lp/archiveuploader/tests/test_sync_notification.py
@@ -53,7 +53,6 @@ class FakeChangesFile:
class TestSyncNotification(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makePersonWithEmail(self):
diff --git a/lib/lp/archiveuploader/tests/test_uploadpolicy.py b/lib/lp/archiveuploader/tests/test_uploadpolicy.py
index 042901f..71dd315 100644
--- a/lib/lp/archiveuploader/tests/test_uploadpolicy.py
+++ b/lib/lp/archiveuploader/tests/test_uploadpolicy.py
@@ -146,7 +146,6 @@ class TestUploadPolicy_validateUploadType(TestCase):
class TestUploadPolicy(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_getUtility_returns_class(self):
diff --git a/lib/lp/archiveuploader/uploadpolicy.py b/lib/lp/archiveuploader/uploadpolicy.py
index 1448e31..2a99076 100644
--- a/lib/lp/archiveuploader/uploadpolicy.py
+++ b/lib/lp/archiveuploader/uploadpolicy.py
@@ -46,7 +46,6 @@ class IArchiveUploadPolicy(Interface):
class ArchiveUploadType(EnumeratedType):
-
SOURCE_ONLY = Item("Source only")
BINARY_ONLY = Item("Binary only")
MIXED_ONLY = Item("Mixed only")
diff --git a/lib/lp/archiveuploader/utils.py b/lib/lp/archiveuploader/utils.py
index 5b3e176..c355ba4 100644
--- a/lib/lp/archiveuploader/utils.py
+++ b/lib/lp/archiveuploader/utils.py
@@ -52,7 +52,6 @@ class UploadWarning(Warning):
class DpkgSourceError(Exception):
-
_fmt = "Unable to unpack source package (%(result)s): %(output)s"
def __init__(self, command, output, result):
@@ -310,7 +309,7 @@ def merge_file_lists(files, checksums_sha1, checksums_sha256, changes=True):
# that we see.
file_hashes = defaultdict(dict)
hash_files = defaultdict(lambda: defaultdict(int))
- for (algo, checksums) in [
+ for algo, checksums in [
("SHA1", checksums_sha1),
("SHA256", checksums_sha256),
]:
diff --git a/lib/lp/blueprints/browser/person.py b/lib/lp/blueprints/browser/person.py
index 4efa613..f3b322c 100644
--- a/lib/lp/blueprints/browser/person.py
+++ b/lib/lp/blueprints/browser/person.py
@@ -15,7 +15,6 @@ from lp.services.webapp.publisher import LaunchpadView
class PersonSpecsMenu(NavigationMenu):
-
usedfor = IPerson
facet = "specifications"
links = [
diff --git a/lib/lp/blueprints/browser/specification.py b/lib/lp/blueprints/browser/specification.py
index 92f61af..262b7d6 100644
--- a/lib/lp/blueprints/browser/specification.py
+++ b/lib/lp/blueprints/browser/specification.py
@@ -475,7 +475,6 @@ class NewSpecificationFromSprintView(NewSpecificationFromNonTargetView):
class SpecificationNavigation(Navigation):
-
usedfor = ISpecification
@stepthrough("+subscription")
@@ -513,14 +512,12 @@ class SpecificationEditLinksMixin:
class SpecificationActionMenu(NavigationMenu, SpecificationEditLinksMixin):
-
usedfor = ISpecification
facet = "specifications"
links = ("edit", "supersede", "retarget")
class SpecificationContextMenu(ContextMenu, SpecificationEditLinksMixin):
-
usedfor = ISpecification
links = [
"edit",
@@ -864,7 +861,6 @@ class SpecificationEditSchema(ISpecification):
class SpecificationEditView(LaunchpadEditFormView):
-
schema = SpecificationEditSchema
field_names = ["name", "title", "specurl", "summary", "whiteboard"]
next_url = None
@@ -1071,12 +1067,10 @@ class SpecificationGoalDecideView(LaunchpadFormView):
class ISpecificationRetargetingSchema(Interface):
-
target = copy_field(ISpecification["target"], readonly=False)
class SpecificationRetargetingView(LaunchpadFormView):
-
schema = ISpecificationRetargetingSchema
field_names = ["target"]
label = _("Move this blueprint to a different project")
@@ -1385,7 +1379,6 @@ class SpecGraph:
class SpecificationSprintAddView(LaunchpadFormView):
-
schema = ISprintSpecification
label = _("Propose specification for meeting agenda")
field_names = ["sprint"]
@@ -1564,7 +1557,6 @@ here = os.path.dirname(__file__)
class SpecificationTreePNGView(SpecificationTreeGraphView):
-
fail_over_image_path = os.path.join(
config.root,
"lib",
diff --git a/lib/lp/blueprints/browser/specificationdependency.py b/lib/lp/blueprints/browser/specificationdependency.py
index 513ac61..5955658 100644
--- a/lib/lp/blueprints/browser/specificationdependency.py
+++ b/lib/lp/blueprints/browser/specificationdependency.py
@@ -23,7 +23,6 @@ from lp.services.webapp import LaunchpadView, canonical_url
class AddSpecificationDependencySchema(Interface):
-
dependency = copy_field(
ISpecificationDependency["dependency"],
readonly=False,
@@ -89,7 +88,6 @@ class SpecificationDependencyRemoveView(LaunchpadFormView):
class SpecificationDependencyTreeView(LaunchpadView):
-
label = "Blueprint dependency tree"
@property
diff --git a/lib/lp/blueprints/browser/specificationsubscription.py b/lib/lp/blueprints/browser/specificationsubscription.py
index c4e15ae..c8f9432 100644
--- a/lib/lp/blueprints/browser/specificationsubscription.py
+++ b/lib/lp/blueprints/browser/specificationsubscription.py
@@ -113,7 +113,6 @@ class SpecificationSubscriptionDeleteView(LaunchpadFormView):
class SpecificationSubscriptionEditView(LaunchpadEditFormView):
-
schema = ISpecificationSubscription
field_names = ["essential"]
diff --git a/lib/lp/blueprints/browser/sprint.py b/lib/lp/blueprints/browser/sprint.py
index debe896..d7eb8d0 100644
--- a/lib/lp/blueprints/browser/sprint.py
+++ b/lib/lp/blueprints/browser/sprint.py
@@ -91,7 +91,6 @@ class SprintFacets(StandardLaunchpadFacets):
class SprintNavigation(Navigation):
-
usedfor = ISprint
@@ -159,7 +158,6 @@ class SprintSpecificationsMenu(NavigationMenu, HasSpecificationsMenuMixin):
class SprintSetNavigation(GetitemNavigation):
-
usedfor = ISprintSet
@@ -170,13 +168,11 @@ class SprintSetBreadcrumb(Breadcrumb):
class HasSprintsView(LaunchpadView):
-
page_title = "Events"
@implementer(IMajorHeadingView)
class SprintView(HasSpecificationsView):
-
# XXX Michael Nelson 20090923 bug=435255
# This class inherits a label from HasSpecificationsView, which causes
# a second h1 to display. But as this view implements IMajorHeadingView
@@ -335,7 +331,6 @@ class SprintAddView(LaunchpadFormView):
class SprintBrandingView(BrandingChangeView):
-
schema = ISprint
# sabdfl 2007-03-28 deliberately leaving icon off the list, i think it
# would be overkill, we can add it later if people ask for it
@@ -543,7 +538,6 @@ class SprintMeetingExportView(LaunchpadView):
for spec in self.context.specifications(
self.user, filter=[SpecificationFilter.ACCEPTED]
):
-
# Skip sprints with no priority or less than LOW.
if spec.priority < SpecificationPriority.UNDEFINED:
continue
diff --git a/lib/lp/blueprints/browser/sprintattendance.py b/lib/lp/blueprints/browser/sprintattendance.py
index baeea2f..acb8d48 100644
--- a/lib/lp/blueprints/browser/sprintattendance.py
+++ b/lib/lp/blueprints/browser/sprintattendance.py
@@ -22,7 +22,6 @@ from lp.services.webapp import canonical_url
class BaseSprintAttendanceAddView(LaunchpadFormView):
-
schema = ISprintAttendance
custom_widget_time_starts = DateTimeWidget
custom_widget_time_ends = DateTimeWidget
diff --git a/lib/lp/blueprints/browser/tests/test_hasspecifications.py b/lib/lp/blueprints/browser/tests/test_hasspecifications.py
index 501fc63..289ee9f 100644
--- a/lib/lp/blueprints/browser/tests/test_hasspecifications.py
+++ b/lib/lp/blueprints/browser/tests/test_hasspecifications.py
@@ -7,7 +7,6 @@ from lp.testing.views import create_initialized_view
class TestPersonSpecWorkloadView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py b/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py
index 917012d..3dc34df 100644
--- a/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py
+++ b/lib/lp/blueprints/browser/tests/test_person_upcomingwork.py
@@ -25,7 +25,6 @@ from lp.testing.views import create_initialized_view
class Test_getWorkItemsDueBefore(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -190,7 +189,6 @@ class Test_getWorkItemsDueBefore(TestCaseWithFactory):
class TestGenericWorkItem(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -254,7 +252,6 @@ class TestWorkItemContainer(TestCase):
class TestPersonUpcomingWork(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -474,7 +471,6 @@ class TestPersonUpcomingWork(BrowserTestCase):
class TestPersonUpcomingWorkView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/blueprints/browser/tests/test_specification.py b/lib/lp/blueprints/browser/tests/test_specification.py
index 4dd927b..3833820 100644
--- a/lib/lp/blueprints/browser/tests/test_specification.py
+++ b/lib/lp/blueprints/browser/tests/test_specification.py
@@ -55,7 +55,6 @@ from lp.testing.views import create_initialized_view
class TestSpecificationSearch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_search_with_percent(self):
@@ -67,7 +66,6 @@ class TestSpecificationSearch(TestCaseWithFactory):
class TestBranchTraversal(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -227,7 +225,6 @@ class TestSpecificationView(BrowserTestCase):
class TestSpecificationSet(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_index_with_proprietary(self):
@@ -264,7 +261,6 @@ class TestSpecificationSet(BrowserTestCase):
class TestSpecificationInformationType(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
portlet_tag = soupmatchers.Tag(
@@ -398,7 +394,6 @@ NEW_SPEC_FROM_ROOT_URL = "http://blueprints.launchpad.test/specs/+new"
class NewSpecificationTests:
-
expected_keys = {"PROPRIETARY", "PUBLIC", "EMBARGOED"}
def _create_form_data(self, context):
@@ -445,7 +440,6 @@ class NewSpecificationTests:
class TestNewSpecificationFromRootView(
TestCaseWithFactory, NewSpecificationTests
):
-
layer = DatabaseFunctionalLayer
def createInitializedView(self):
@@ -466,7 +460,6 @@ class TestNewSpecificationFromRootView(
class TestNewSpecificationFromSprintView(
TestCaseWithFactory, NewSpecificationTests
):
-
layer = DatabaseFunctionalLayer
def createInitializedView(self):
@@ -487,7 +480,6 @@ class TestNewSpecificationFromSprintView(
class TestNewSpecificationFromProjectGroupView(
TestCaseWithFactory, NewSpecificationTests
):
-
layer = DatabaseFunctionalLayer
def createInitializedView(self):
@@ -508,7 +500,6 @@ class TestNewSpecificationFromProjectGroupView(
class TestNewSpecificationFromProductView(
TestCaseWithFactory, NewSpecificationTests
):
-
layer = DatabaseFunctionalLayer
expected_keys = {"PROPRIETARY", "EMBARGOED"}
@@ -530,7 +521,6 @@ class TestNewSpecificationFromProductView(
class TestNewSpecificationFromDistributionView(
TestCaseWithFactory, NewSpecificationTests
):
-
layer = DatabaseFunctionalLayer
expected_keys = {"PUBLIC"}
@@ -541,7 +531,6 @@ class TestNewSpecificationFromDistributionView(
class TestNewSpecificationInformationType(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -628,7 +617,6 @@ class TestNewSpecificationInformationType(BrowserTestCase):
class BaseNewSpecificationInformationTypeDefaultMixin:
-
layer = DatabaseFunctionalLayer
def _setUp(self):
@@ -917,7 +905,6 @@ class TestSecificationHelpers(unittest.TestCase):
class TestSpecificationFieldXHTMLRepresentations(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_starter_empty(self):
diff --git a/lib/lp/blueprints/browser/tests/test_specificationdependency.py b/lib/lp/blueprints/browser/tests/test_specificationdependency.py
index b42cfa7..0b49e3f 100644
--- a/lib/lp/blueprints/browser/tests/test_specificationdependency.py
+++ b/lib/lp/blueprints/browser/tests/test_specificationdependency.py
@@ -20,7 +20,6 @@ from lp.testing.views import create_view
class TestAddDependency(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_add_dependency_by_url(self):
@@ -42,7 +41,6 @@ class TestAddDependency(BrowserTestCase):
class TestDepTree(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_deptree_filters_dependencies(self):
diff --git a/lib/lp/blueprints/browser/tests/test_specificationtarget.py b/lib/lp/blueprints/browser/tests/test_specificationtarget.py
index 8d51ef1..931c046 100644
--- a/lib/lp/blueprints/browser/tests/test_specificationtarget.py
+++ b/lib/lp/blueprints/browser/tests/test_specificationtarget.py
@@ -123,7 +123,6 @@ class TestHasSpecificationsViewInvolvement(TestCaseWithFactory):
class TestAssignments(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -217,7 +216,6 @@ class TestHasSpecificationsTemplates(TestCaseWithFactory):
class TestHasSpecificationsConfiguration(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_cannot_configure_blueprints_product_no_edit_permission(self):
@@ -320,7 +318,6 @@ class SpecificationSetViewTestCase(TestCaseWithFactory):
class TestPrivacy(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_product_specs(self):
diff --git a/lib/lp/blueprints/browser/tests/test_sprint.py b/lib/lp/blueprints/browser/tests/test_sprint.py
index 00d63f3..dadc252 100644
--- a/lib/lp/blueprints/browser/tests/test_sprint.py
+++ b/lib/lp/blueprints/browser/tests/test_sprint.py
@@ -22,7 +22,6 @@ from lp.testing.matchers import BrowsesWithQueryLimit, HasQueryCount
class TestSprintIndex(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_query_count(self):
@@ -64,7 +63,6 @@ class TestSprintIndex(BrowserTestCase):
class TestSprintDeleteView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def makePopulatedSprint(self):
diff --git a/lib/lp/blueprints/browser/tests/test_views.py b/lib/lp/blueprints/browser/tests/test_views.py
index 1e2c49e..5acb18d 100644
--- a/lib/lp/blueprints/browser/tests/test_views.py
+++ b/lib/lp/blueprints/browser/tests/test_views.py
@@ -25,7 +25,6 @@ from lp.testing.systemdocs import LayeredDocFileSuite, setUp, tearDown
class TestAssignments(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/blueprints/interfaces/specification.py b/lib/lp/blueprints/interfaces/specification.py
index b47f64d..6615407 100644
--- a/lib/lp/blueprints/interfaces/specification.py
+++ b/lib/lp/blueprints/interfaces/specification.py
@@ -83,7 +83,6 @@ class GoalProposeError(Exception):
class SpecNameField(ContentNameField):
-
errormessage = _("%s is already in use by another blueprint.")
@property
@@ -126,7 +125,6 @@ class SpecNameField(ContentNameField):
class SpecURLField(TextLine):
-
errormessage = _('%s is already registered by <a href="%s">%s</a>.')
def _validate(self, specurl):
diff --git a/lib/lp/blueprints/interfaces/sprint.py b/lib/lp/blueprints/interfaces/sprint.py
index 9809925..e9a52d4 100644
--- a/lib/lp/blueprints/interfaces/sprint.py
+++ b/lib/lp/blueprints/interfaces/sprint.py
@@ -32,7 +32,6 @@ from lp.services.fields import (
class SprintNameField(ContentNameField):
-
errormessage = _("%s is already in use by another sprint.")
@property
diff --git a/lib/lp/blueprints/model/specificationworkitem.py b/lib/lp/blueprints/model/specificationworkitem.py
index a7e5ec1..79f9316 100644
--- a/lib/lp/blueprints/model/specificationworkitem.py
+++ b/lib/lp/blueprints/model/specificationworkitem.py
@@ -24,7 +24,6 @@ from lp.services.helpers import backslashreplace
@implementer(ISpecificationWorkItem)
class SpecificationWorkItem(StormBase):
-
__storm_table__ = "SpecificationWorkItem"
__storm_order__ = "id"
diff --git a/lib/lp/blueprints/model/tests/test_specification.py b/lib/lp/blueprints/model/tests/test_specification.py
index 79f6b5c..f361df4 100644
--- a/lib/lp/blueprints/model/tests/test_specification.py
+++ b/lib/lp/blueprints/model/tests/test_specification.py
@@ -151,7 +151,6 @@ class TestSpecificationDependencies(TestCaseWithFactory):
class TestSpecificationSubscriptionSort(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_subscribers(self):
@@ -174,7 +173,6 @@ class TestSpecificationSubscriptionSort(TestCaseWithFactory):
class TestSpecificationValidation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_specurl_validation_duplicate(self):
@@ -746,7 +744,6 @@ class TestSpecificationWorkItems(TestCaseWithFactory):
class TestSpecificationInformationType(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_transitionToInformationType(self):
diff --git a/lib/lp/blueprints/model/tests/test_sprint.py b/lib/lp/blueprints/model/tests/test_sprint.py
index 7fdbcc9..5c5ba93 100644
--- a/lib/lp/blueprints/model/tests/test_sprint.py
+++ b/lib/lp/blueprints/model/tests/test_sprint.py
@@ -27,7 +27,6 @@ def list_result(sprint, filter=None, user=None):
class TestSpecifications(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -246,7 +245,6 @@ class TestSpecifications(TestCaseWithFactory):
class TestSprintAttendancesSort(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_attendances(self):
diff --git a/lib/lp/blueprints/publisher.py b/lib/lp/blueprints/publisher.py
index a138910..0f56d5b 100644
--- a/lib/lp/blueprints/publisher.py
+++ b/lib/lp/blueprints/publisher.py
@@ -24,7 +24,6 @@ from lp.services.webapp.servers import (
@implementer(IFacet)
class SpecificationsFacet:
-
name = "specifications"
rootsite = "blueprints"
text = "Blueprints"
diff --git a/lib/lp/blueprints/security.py b/lib/lp/blueprints/security.py
index a310438..76217f4 100644
--- a/lib/lp/blueprints/security.py
+++ b/lib/lp/blueprints/security.py
@@ -26,7 +26,6 @@ from lp.security import ModerateByRegistryExpertsOrAdmins
class EditSpecificationBranch(AuthorizationBase):
-
usedfor = ISpecificationBranch
permission = "launchpad.Edit"
@@ -39,7 +38,6 @@ class EditSpecificationBranch(AuthorizationBase):
class ViewSpecificationBranch(EditSpecificationBranch):
-
permission = "launchpad.View"
def checkUnauthenticated(self):
@@ -62,7 +60,6 @@ class AnonymousAccessToISpecificationPublic(AnonymousAuthorization):
class ViewSpecification(AuthorizationBase):
-
permission = "launchpad.LimitedView"
usedfor = ISpecificationView
diff --git a/lib/lp/blueprints/tests/test_hasspecifications.py b/lib/lp/blueprints/tests/test_hasspecifications.py
index 7082cd5..bd735d6 100644
--- a/lib/lp/blueprints/tests/test_hasspecifications.py
+++ b/lib/lp/blueprints/tests/test_hasspecifications.py
@@ -11,7 +11,6 @@ from lp.testing.matchers import DoesNotSnapshot
class HasSpecificationsTests(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertNamesOfSpecificationsAre(self, expected_names, specifications):
diff --git a/lib/lp/blueprints/tests/test_specification.py b/lib/lp/blueprints/tests/test_specification.py
index 2778005..728bcf5 100644
--- a/lib/lp/blueprints/tests/test_specification.py
+++ b/lib/lp/blueprints/tests/test_specification.py
@@ -52,7 +52,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class SpecificationTests(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_target_driver_has_edit_rights(self):
@@ -721,7 +720,6 @@ class SpecificationTests(TestCaseWithFactory):
class TestSpecificationSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -776,7 +774,6 @@ def list_result(context, filter=None, user=None):
class TestSpecifications(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1055,7 +1052,6 @@ class TestSpecifications(TestCaseWithFactory):
class TestBugLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_link_and_unlink(self):
diff --git a/lib/lp/blueprints/tests/test_webservice.py b/lib/lp/blueprints/tests/test_webservice.py
index f0f1ae1..c7ffd6f 100644
--- a/lib/lp/blueprints/tests/test_webservice.py
+++ b/lib/lp/blueprints/tests/test_webservice.py
@@ -350,7 +350,6 @@ class SpecificationAttributeWebserviceTests(TestCaseWithFactory):
class SpecificationMutationTests(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_set_information_type(self):
@@ -569,7 +568,6 @@ class IHasSpecificationsTests(TestCaseWithFactory):
class TestSpecificationSubscription(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_subscribe(self):
@@ -636,7 +634,6 @@ class TestSpecificationSubscription(TestCaseWithFactory):
class TestSpecificationBugLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_bug_linking(self):
@@ -713,7 +710,6 @@ class TestSpecificationBugLinks(TestCaseWithFactory):
class TestSpecificationGoalHandling(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/adapters/tests/test_bugchange.py b/lib/lp/bugs/adapters/tests/test_bugchange.py
index 6a8c3b9..0e8515a 100644
--- a/lib/lp/bugs/adapters/tests/test_bugchange.py
+++ b/lib/lp/bugs/adapters/tests/test_bugchange.py
@@ -19,7 +19,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class BugChangeTestCase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -42,7 +41,6 @@ class BugChangeTestCase(TestCaseWithFactory):
class BugChangeLevelTestCase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py b/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py
index b17527f..80aaf13 100644
--- a/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py
+++ b/lib/lp/bugs/adapters/tests/test_bugsubscriptionfilter.py
@@ -14,7 +14,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class BugSubscriptionFilterTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_bugsubscriptionfilter_to_product_with_product(self):
diff --git a/lib/lp/bugs/browser/bug.py b/lib/lp/bugs/browser/bug.py
index 717f39c..3a34c23 100644
--- a/lib/lp/bugs/browser/bug.py
+++ b/lib/lp/bugs/browser/bug.py
@@ -631,7 +631,6 @@ class BugView(LaunchpadView, BugViewMixin):
class BugActivity(BugView):
-
page_title = "Activity log"
@cachedproperty
@@ -1186,7 +1185,6 @@ class BugTextView(LaunchpadView):
]
def bug_text(self):
-
"""Return the bug information for text display."""
bug = self.context
diff --git a/lib/lp/bugs/browser/bugalsoaffects.py b/lib/lp/bugs/browser/bugalsoaffects.py
index 642dd90..3558dc4 100644
--- a/lib/lp/bugs/browser/bugalsoaffects.py
+++ b/lib/lp/bugs/browser/bugalsoaffects.py
@@ -344,7 +344,6 @@ class BugTaskCreationStep(AlsoAffectsStep):
class IAddDistroBugTaskForm(IAddBugTaskForm):
-
sourcepackagename = Choice(
title=_("Source Package Name"),
required=False,
@@ -777,7 +776,6 @@ class BugTrackerCreationStep(AlsoAffectsStep):
class DistroBugTrackerCreationStep(BugTrackerCreationStep):
-
_next_step = DistroBugTaskCreationStep
_field_names = ["distribution", "sourcepackagename", "bug_url"]
custom_widget_distribution = CustomWidgetFactory(
@@ -793,7 +791,6 @@ class DistroBugTrackerCreationStep(BugTrackerCreationStep):
class UpstreamBugTrackerCreationStep(BugTrackerCreationStep):
-
schema = IAddBugTaskWithUpstreamLinkForm
_next_step = ProductBugTaskCreationStep
_field_names = ["product", "bug_url", "link_upstream_how"]
diff --git a/lib/lp/bugs/browser/bugattachment.py b/lib/lp/bugs/browser/bugattachment.py
index 0588b51..65d782b 100644
--- a/lib/lp/bugs/browser/bugattachment.py
+++ b/lib/lp/bugs/browser/bugattachment.py
@@ -70,7 +70,6 @@ class BugAttachmentContentCheck:
class BugAttachmentSetNavigation(GetitemNavigation):
-
usedfor = IBugAttachmentSet
diff --git a/lib/lp/bugs/browser/bugmessage.py b/lib/lp/bugs/browser/bugmessage.py
index 45761fc..4f61fb6 100644
--- a/lib/lp/bugs/browser/bugmessage.py
+++ b/lib/lp/bugs/browser/bugmessage.py
@@ -53,7 +53,6 @@ class BugMessageAddFormView(LaunchpadFormView, BugAttachmentContentCheck):
return "%s/+addcomment" % canonical_url(self.context)
def validate(self, data):
-
# Ensure either a comment or filecontent or a URL was provided,
# but only if no errors have already been noted.
if len(self.errors) == 0:
@@ -113,7 +112,6 @@ class BugMessageAddFormView(LaunchpadFormView, BugAttachmentContentCheck):
attachment_description = data.get("attachment_description")
if file_:
-
# Slashes in filenames cause problems, convert them to dashes
# instead.
filename = file_.filename.replace("/", "-")
diff --git a/lib/lp/bugs/browser/bugnomination.py b/lib/lp/bugs/browser/bugnomination.py
index cf6c816..22d8941 100644
--- a/lib/lp/bugs/browser/bugnomination.py
+++ b/lib/lp/bugs/browser/bugnomination.py
@@ -28,7 +28,6 @@ from lp.services.webapp.interfaces import ILaunchBag
class BugNominationView(LaunchpadFormView):
-
schema = IBugNominationForm
initial_focus_widget = None
custom_widget_nominatable_series = LabeledMultiCheckBoxWidget
diff --git a/lib/lp/bugs/browser/bugtarget.py b/lib/lp/bugs/browser/bugtarget.py
index c706156..6e4b6f8 100644
--- a/lib/lp/bugs/browser/bugtarget.py
+++ b/lib/lp/bugs/browser/bugtarget.py
@@ -986,7 +986,6 @@ class FileBugAdvancedView(LaunchpadView):
class IDistroBugAddForm(IBugAddForm):
-
packagename = copy_field(
IBugAddForm["packagename"], vocabularyName="DistributionSourcePackage"
)
@@ -1076,7 +1075,6 @@ class FilebugShowSimilarBugsView(FileBugViewBase):
class FileBugGuidedView(FilebugShowSimilarBugsView):
-
page_title = "Report a bug"
_SEARCH_FOR_DUPES = ViewPageTemplateFile(
diff --git a/lib/lp/bugs/browser/bugtask.py b/lib/lp/bugs/browser/bugtask.py
index f30dea5..ad3a7a2 100644
--- a/lib/lp/bugs/browser/bugtask.py
+++ b/lib/lp/bugs/browser/bugtask.py
@@ -1158,7 +1158,6 @@ class BugTaskPrivilegeMixin:
class IBugTaskEditForm(IBugTask):
-
sourcepackagename = copy_field(
IBugTask["sourcepackagename"],
vocabularyName="DistributionSourcePackage",
diff --git a/lib/lp/bugs/browser/bugtracker.py b/lib/lp/bugs/browser/bugtracker.py
index 0c02abc..07389e1 100644
--- a/lib/lp/bugs/browser/bugtracker.py
+++ b/lib/lp/bugs/browser/bugtracker.py
@@ -84,12 +84,10 @@ NO_DIRECT_CREATION_TRACKERS = SINGLE_INSTANCE_TRACKERS + (
class BugTrackerSetNavigation(GetitemNavigation):
-
usedfor = IBugTrackerSet
class BugTrackerSetContextMenu(ContextMenu):
-
usedfor = IBugTrackerSet
links = ["newbugtracker"]
@@ -100,7 +98,6 @@ class BugTrackerSetContextMenu(ContextMenu):
class BugTrackerAddView(LaunchpadFormView):
-
page_title = "Register an external bug tracker"
schema = IBugTracker
label = page_title
@@ -216,7 +213,6 @@ class BugTrackerSetView(LaunchpadView):
class BugTrackerView(LaunchpadView):
-
usedfor = IBugTracker
@property
@@ -250,7 +246,6 @@ BUG_TRACKER_ACTIVE_VOCABULARY = SimpleVocabulary.fromItems(
class BugTrackerEditView(LaunchpadEditFormView):
-
schema = IBugTracker
custom_widget_summary = CustomWidgetFactory(
TextAreaWidget, width=30, height=5
@@ -469,7 +464,6 @@ class BugTrackerEditView(LaunchpadEditFormView):
class BugTrackerNavigation(Navigation):
-
usedfor = IBugTracker
def traverse(self, remotebug):
@@ -578,7 +572,6 @@ class BugTrackerEditComponentView(LaunchpadEditFormView):
class BugTrackerComponentGroupNavigation(Navigation):
-
usedfor = IBugTrackerComponentGroup
def traverse(self, id):
@@ -618,7 +611,6 @@ class RemoteBugView(LaunchpadView):
class BugTrackerNavigationMenu(NavigationMenu):
-
usedfor = BugTrackerView
facet = "bugs"
links = ["edit"]
diff --git a/lib/lp/bugs/browser/bugwatch.py b/lib/lp/bugs/browser/bugwatch.py
index 70ba5eb..d1d51bd 100644
--- a/lib/lp/bugs/browser/bugwatch.py
+++ b/lib/lp/bugs/browser/bugwatch.py
@@ -33,7 +33,6 @@ from lp.services.webapp.interfaces import ILaunchBag
class BugWatchSetNavigation(GetitemNavigation):
-
usedfor = IBugWatchSet
diff --git a/lib/lp/bugs/browser/cve.py b/lib/lp/bugs/browser/cve.py
index 1067612..5f42ed7 100644
--- a/lib/lp/bugs/browser/cve.py
+++ b/lib/lp/bugs/browser/cve.py
@@ -30,12 +30,10 @@ from lp.services.webapp.batching import BatchNavigator
class CveSetNavigation(GetitemNavigation):
-
usedfor = ICveSet
class CveContextMenu(ContextMenu):
-
usedfor = ICve
links = ["linkbug", "unlinkbug"]
@@ -50,7 +48,6 @@ class CveContextMenu(ContextMenu):
class CveSetContextMenu(ContextMenu):
-
usedfor = ICveSet
links = ["findcve", "allcve"]
diff --git a/lib/lp/bugs/browser/cvereport.py b/lib/lp/bugs/browser/cvereport.py
index e2f2f7d..2c5ae2d 100644
--- a/lib/lp/bugs/browser/cvereport.py
+++ b/lib/lp/bugs/browser/cvereport.py
@@ -84,7 +84,6 @@ class CVEReportView(LaunchpadView):
@cachedproperty
def _bugtaskcves(self) -> BugTaskCves:
-
bugtaskcves = BugTaskCves(open=[], resolved=[])
search_params = BugTaskSearchParams(self.user, has_cve=True)
diff --git a/lib/lp/bugs/browser/malone.py b/lib/lp/bugs/browser/malone.py
index ff178e8..6b72df5 100644
--- a/lib/lp/bugs/browser/malone.py
+++ b/lib/lp/bugs/browser/malone.py
@@ -25,7 +25,6 @@ from lp.services.webapp.menu import NavigationMenu
class MaloneApplicationNavigation(Navigation):
-
usedfor = IMaloneApplication
newlayer = BugsLayer
@@ -66,7 +65,6 @@ class MaloneApplicationNavigation(Navigation):
class MaloneRelatedPages(NavigationMenu):
-
facet = "bugs"
title = "Related pages"
usedfor = MaloneView
diff --git a/lib/lp/bugs/browser/person.py b/lib/lp/bugs/browser/person.py
index 3182f60..cb004b8 100644
--- a/lib/lp/bugs/browser/person.py
+++ b/lib/lp/bugs/browser/person.py
@@ -63,7 +63,6 @@ def get_package_search_url(dsp_bugs_url, extra_params=None):
class PersonBugsMenu(NavigationMenu):
-
usedfor = IPerson
facet = "bugs"
links = [
@@ -159,7 +158,6 @@ class RelevantMilestonesMixin:
class BugSubscriberPackageBugsOverView(LaunchpadView):
-
label = "Subscribed packages"
@cachedproperty
diff --git a/lib/lp/bugs/browser/structuralsubscription.py b/lib/lp/bugs/browser/structuralsubscription.py
index ddfa4d5..95e5145 100644
--- a/lib/lp/bugs/browser/structuralsubscription.py
+++ b/lib/lp/bugs/browser/structuralsubscription.py
@@ -54,7 +54,6 @@ from lp.services.webapp.publisher import (
class StructuralSubscriptionNavigation(Navigation):
-
usedfor = IStructuralSubscription
@stepthrough("+filter")
diff --git a/lib/lp/bugs/browser/tests/test_bug_context_menu.py b/lib/lp/bugs/browser/tests/test_bug_context_menu.py
index 2b2472d..d3a1dea 100644
--- a/lib/lp/bugs/browser/tests/test_bug_context_menu.py
+++ b/lib/lp/bugs/browser/tests/test_bug_context_menu.py
@@ -16,7 +16,6 @@ from lp.testing.views import create_initialized_view
class TestBugContextMenu(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bug_views.py b/lib/lp/bugs/browser/tests/test_bug_views.py
index 213887a..b4373ae 100644
--- a/lib/lp/bugs/browser/tests/test_bug_views.py
+++ b/lib/lp/bugs/browser/tests/test_bug_views.py
@@ -43,7 +43,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestPrivateBugLinks(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_private_master_not_linked_without_permission(self):
@@ -227,7 +226,6 @@ class TestEmailObfuscated(BrowserTestCase):
class TestBugPortletSubscribers(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -956,7 +954,6 @@ class TestBugMarkAsDuplicateView(TestCaseWithFactory):
class TestBugActivityView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_bug_activity_query_count(self):
@@ -986,7 +983,6 @@ class TestBugActivityView(TestCaseWithFactory):
class TestMainBugView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugalsoaffects.py b/lib/lp/bugs/browser/tests/test_bugalsoaffects.py
index d8c3f3a..0e49526 100644
--- a/lib/lp/bugs/browser/tests/test_bugalsoaffects.py
+++ b/lib/lp/bugs/browser/tests/test_bugalsoaffects.py
@@ -12,7 +12,6 @@ from lp.testing.pages import get_feedback_messages
class TestBugAlsoAffectsDistribution(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugcomment.py b/lib/lp/bugs/browser/tests/test_bugcomment.py
index 24d664c..35b7436 100644
--- a/lib/lp/bugs/browser/tests/test_bugcomment.py
+++ b/lib/lp/bugs/browser/tests/test_bugcomment.py
@@ -64,7 +64,6 @@ class BugCommentStub:
class PersonStub:
-
ids = count(1)
def __init__(self):
@@ -218,7 +217,6 @@ class TestGroupCommentsWithActivities(TestCase):
class TestBugCommentVisibility(BrowserTestCase, TestMessageVisibilityMixin):
-
layer = DatabaseFunctionalLayer
def makeHiddenMessage(self, comment_owner=None):
@@ -240,7 +238,6 @@ class TestBugCommentVisibility(BrowserTestCase, TestMessageVisibilityMixin):
class TestBugHideCommentControls(BrowserTestCase, TestHideMessageControlMixin):
-
layer = DatabaseFunctionalLayer
def getContext(self, comment_owner=None):
@@ -283,7 +280,6 @@ class TestBugHideCommentControls(BrowserTestCase, TestHideMessageControlMixin):
class TestBugCommentMicroformats(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_bug_comment_metadata(self):
@@ -307,7 +303,6 @@ class TestBugCommentMicroformats(BrowserTestCase):
class TestBugCommentImplementsInterface(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_bug_comment_implements_interface(self):
@@ -346,7 +341,6 @@ def make_bug_comment(factory, *args, **kwargs):
class TestBugCommentInBrowser(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_excessive_comments_redirect_to_download(self):
diff --git a/lib/lp/bugs/browser/tests/test_buglisting.py b/lib/lp/bugs/browser/tests/test_buglisting.py
index 271dcf1..f11f586 100644
--- a/lib/lp/bugs/browser/tests/test_buglisting.py
+++ b/lib/lp/bugs/browser/tests/test_buglisting.py
@@ -27,7 +27,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestBugTaskSearchListingPage(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def _makeDistributionSourcePackage(self):
@@ -314,7 +313,6 @@ class BugTargetTestCase(TestCaseWithFactory):
class TestBugTaskSearchListingViewProduct(BugTargetTestCase):
-
layer = DatabaseFunctionalLayer
def test_external_bugtracker_is_none(self):
@@ -409,7 +407,6 @@ class TestBugTaskSearchListingViewProduct(BugTargetTestCase):
class TestBugTaskSearchListingViewDSP(BugTargetTestCase):
-
layer = DatabaseFunctionalLayer
def _getBugTarget(self, obj):
diff --git a/lib/lp/bugs/browser/tests/test_bugnomination.py b/lib/lp/bugs/browser/tests/test_bugnomination.py
index 9732f71..b3b2eb6 100644
--- a/lib/lp/bugs/browser/tests/test_bugnomination.py
+++ b/lib/lp/bugs/browser/tests/test_bugnomination.py
@@ -174,7 +174,6 @@ class TestBugNominationView(TestCaseWithFactory):
class TestBugEditLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
edit_link_matcher = soupmatchers.HTMLContains(
diff --git a/lib/lp/bugs/browser/tests/test_bugsubscription_views.py b/lib/lp/bugs/browser/tests/test_bugsubscription_views.py
index 7f0fa3e..cb95564 100644
--- a/lib/lp/bugs/browser/tests/test_bugsubscription_views.py
+++ b/lib/lp/bugs/browser/tests/test_bugsubscription_views.py
@@ -37,7 +37,6 @@ from lp.testing.views import create_initialized_view
class BugsubscriptionPrivacyTests(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -77,7 +76,6 @@ class BugsubscriptionPrivacyTests(TestCaseWithFactory):
class BugSubscriptionAdvancedFeaturesTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py b/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py
index 090cae7..0a14d23 100644
--- a/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py
+++ b/lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py
@@ -49,7 +49,6 @@ class TestBugSubscriptionFilterBase:
class TestBugSubscriptionFilterNavigation(
TestBugSubscriptionFilterBase, TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def test_canonical_url(self):
@@ -74,7 +73,6 @@ class TestBugSubscriptionFilterNavigation(
class TestBugSubscriptionFilterAPI(
TestBugSubscriptionFilterBase, TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def test_visible_attributes(self):
@@ -138,7 +136,6 @@ class TestBugSubscriptionFilterAPI(
class TestBugSubscriptionFilterAPIModifications(
TestBugSubscriptionFilterBase, TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -246,7 +243,6 @@ class TestBugSubscriptionFilterAPIModifications(
class TestBugSubscriptionFilterView(
TestBugSubscriptionFilterBase, TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -473,7 +469,6 @@ class TestBugSubscriptionFilterView(
class TestBugSubscriptionFilterEditView(
TestBugSubscriptionFilterBase, TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def test_view_properties(self):
@@ -587,7 +582,6 @@ class TestBugSubscriptionFilterAdvancedFeatures(TestCaseWithFactory):
class TestBugSubscriptionFilterCreateView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugsupervisor.py b/lib/lp/bugs/browser/tests/test_bugsupervisor.py
index 0bc50cd..b6d5c57 100644
--- a/lib/lp/bugs/browser/tests/test_bugsupervisor.py
+++ b/lib/lp/bugs/browser/tests/test_bugsupervisor.py
@@ -16,7 +16,6 @@ from lp.testing.views import create_initialized_view
class TestBugSupervisorEditView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -113,7 +112,6 @@ class TestBugSupervisorEditView(TestCaseWithFactory):
class TestBugSupervisorLink(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_with_no_access(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_configure.py b/lib/lp/bugs/browser/tests/test_bugtarget_configure.py
index 880853f..77d3dad 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_configure.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_configure.py
@@ -11,7 +11,6 @@ from lp.testing.views import create_initialized_view
class TestProductBugConfigurationView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py b/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py
index b101b86..0e1450d 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_filebug.py
@@ -41,7 +41,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestBugTargetFileBugConfirmationMessage(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -337,7 +336,6 @@ class FileBugViewMixin:
class TestFileBugViewBase(FileBugViewMixin, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_submit_comment_empty_error(self):
@@ -851,7 +849,6 @@ class FileBugViewBaseExtraDataTestCase(FileBugViewMixin, TestCaseWithFactory):
class TestFileBugForNonBugSupervisors(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def filebug_via_view(
@@ -914,7 +911,6 @@ class TestFileBugForNonBugSupervisors(TestCaseWithFactory):
class TestFileBugSourcePackage(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
scenarios = [
@@ -995,7 +991,6 @@ class TestFileBugSourcePackage(WithScenarios, TestCaseWithFactory):
class ProjectGroupFileBugGuidedViewTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeProjectGroupFileBugView(self, product_name, bug_title, tags=""):
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py b/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py
index ade633f..ca935ab 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_patches_view.py
@@ -12,7 +12,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestBugTargetPatchCountBase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugtarget_tags.py b/lib/lp/bugs/browser/tests/test_bugtarget_tags.py
index eba3828..44a15ab 100644
--- a/lib/lp/bugs/browser/tests/test_bugtarget_tags.py
+++ b/lib/lp/bugs/browser/tests/test_bugtarget_tags.py
@@ -9,7 +9,6 @@ from lp.testing.views import create_view
class TestBugTargetTags(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
scenarios = [
diff --git a/lib/lp/bugs/browser/tests/test_bugtask.py b/lib/lp/bugs/browser/tests/test_bugtask.py
index 3bfbb38..af11290 100644
--- a/lib/lp/bugs/browser/tests/test_bugtask.py
+++ b/lib/lp/bugs/browser/tests/test_bugtask.py
@@ -87,7 +87,6 @@ def getFeedViewCache(target, feed_cls):
class TestBugTaskView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_rendered_query_counts_constant_with_team_memberships(self):
@@ -366,7 +365,6 @@ class TestBugTaskView(TestCaseWithFactory):
class TestBugTasksNominationsView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -627,7 +625,6 @@ class TestBugTasksNominationsView(TestCaseWithFactory):
class TestBugTasksTableView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1474,7 +1471,6 @@ class TestBugTaskEditViewStatusField(TestCaseWithFactory):
class TestBugTaskEditViewAssigneeField(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -2098,7 +2094,6 @@ class TestProjectGroupBugs(TestCaseWithFactory, BugTaskViewTestMixin):
class TestBugActivityItem(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setAttribute(self, obj, attribute, value):
@@ -2521,7 +2516,6 @@ def make_bug_task_listing_item(
class TestBugTaskSearchListingView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
client_listing = soupmatchers.Tag(
@@ -2995,7 +2989,6 @@ class TestBugTaskExpirableListingView(BrowserTestCase):
class TestBugListingBatchNavigator(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_mustache_listings_escaped(self):
@@ -3006,7 +2999,6 @@ class TestBugListingBatchNavigator(TestCaseWithFactory):
class TestBugTaskListingItem(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_model(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugtask_adding.py b/lib/lp/bugs/browser/tests/test_bugtask_adding.py
index 3e9f147..414d393 100644
--- a/lib/lp/bugs/browser/tests/test_bugtask_adding.py
+++ b/lib/lp/bugs/browser/tests/test_bugtask_adding.py
@@ -11,7 +11,6 @@ from lp.testing.views import create_initialized_view
class TestProductBugTaskCreationStep(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugtask_navigation.py b/lib/lp/bugs/browser/tests/test_bugtask_navigation.py
index a3ce126..356f05d 100644
--- a/lib/lp/bugs/browser/tests/test_bugtask_navigation.py
+++ b/lib/lp/bugs/browser/tests/test_bugtask_navigation.py
@@ -13,7 +13,6 @@ from lp.testing.publication import test_traverse
class TestBugTaskTraversal(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_traversal_to_nonexistent_bugtask(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugtracker_component.py b/lib/lp/bugs/browser/tests/test_bugtracker_component.py
index 8b6e9a2..c3d2bb9 100644
--- a/lib/lp/bugs/browser/tests/test_bugtracker_component.py
+++ b/lib/lp/bugs/browser/tests/test_bugtracker_component.py
@@ -13,7 +13,6 @@ from lp.testing.views import create_initialized_view
class BugTrackerEditComponentViewTextCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugtracker_views.py b/lib/lp/bugs/browser/tests/test_bugtracker_views.py
index 521d6fa..642191b 100644
--- a/lib/lp/bugs/browser/tests/test_bugtracker_views.py
+++ b/lib/lp/bugs/browser/tests/test_bugtracker_views.py
@@ -15,7 +15,6 @@ from lp.testing.views import create_initialized_view
class TestBugTrackerView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_related_projects(self):
@@ -53,7 +52,6 @@ class TestBugTrackerView(TestCaseWithFactory):
class TestBugTrackerSetView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_trackers_are_batch_navigators(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugview.py b/lib/lp/bugs/browser/tests/test_bugview.py
index 1124544..695b2f2 100644
--- a/lib/lp/bugs/browser/tests/test_bugview.py
+++ b/lib/lp/bugs/browser/tests/test_bugview.py
@@ -12,7 +12,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, LaunchpadFunctionalLayer
class TestBugView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -57,7 +56,6 @@ class TestBugView(TestCaseWithFactory):
class TestBugInformationTypePortletView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_bugwatch_views.py b/lib/lp/bugs/browser/tests/test_bugwatch_views.py
index 47c0cc0..9e2f4f2 100644
--- a/lib/lp/bugs/browser/tests/test_bugwatch_views.py
+++ b/lib/lp/bugs/browser/tests/test_bugwatch_views.py
@@ -17,7 +17,6 @@ from lp.testing.views import create_initialized_view
class TestBugWatchEditView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py b/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py
index ab62e59..0f41faa 100644
--- a/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py
+++ b/lib/lp/bugs/browser/tests/test_configure_bugtracker_links.py
@@ -14,7 +14,6 @@ from lp.testing.views import create_initialized_view
class TestConfigureBugTrackerBase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/tests/test_expose.py b/lib/lp/bugs/browser/tests/test_expose.py
index c52ca47..c846754 100644
--- a/lib/lp/bugs/browser/tests/test_expose.py
+++ b/lib/lp/bugs/browser/tests/test_expose.py
@@ -347,7 +347,6 @@ class TestStructuralSubscriptionHelpers(TestCase):
class TestIntegrationExposeUserSubscriptionsToJS(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_team_admin_subscription(self):
diff --git a/lib/lp/bugs/browser/tests/test_person_bugs.py b/lib/lp/bugs/browser/tests/test_person_bugs.py
index cc5f9a5..455eac1 100644
--- a/lib/lp/bugs/browser/tests/test_person_bugs.py
+++ b/lib/lp/bugs/browser/tests/test_person_bugs.py
@@ -9,7 +9,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class PersonBugsMenuTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_user(self):
diff --git a/lib/lp/bugs/browser/tests/test_structuralsubscription.py b/lib/lp/bugs/browser/tests/test_structuralsubscription.py
index b8ee3cf..076de82 100644
--- a/lib/lp/bugs/browser/tests/test_structuralsubscription.py
+++ b/lib/lp/bugs/browser/tests/test_structuralsubscription.py
@@ -239,7 +239,6 @@ class TestSourcePackageStructuralSubscribersPortletView(
class TestStructuralSubscriptionAPI(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/browser/widgets/tests/test_bug.py b/lib/lp/bugs/browser/widgets/tests/test_bug.py
index f61f245..cc7f2a4 100644
--- a/lib/lp/bugs/browser/widgets/tests/test_bug.py
+++ b/lib/lp/bugs/browser/widgets/tests/test_bug.py
@@ -9,7 +9,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class BugTagsWidgetTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def get_widget(self, bug_target):
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py b/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py
index 03b3197..de2a217 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_externalbugtracker.py
@@ -44,7 +44,6 @@ class CommentPushingExternalBugTracker(ExternalBugTracker):
class TestCheckwatchesConfig(TestCase):
-
layer = ZopelessDatabaseLayer
base_url = "http://www.example.com/"
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_github.py b/lib/lp/bugs/externalbugtracker/tests/test_github.py
index 7ecc43b..870b706 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_github.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_github.py
@@ -52,7 +52,6 @@ def _add_rate_limit_response(
class TestGitHubRateLimit(TestCase):
-
layer = ZopelessLayer
def setUp(self):
@@ -130,7 +129,6 @@ class TestGitHubRateLimit(TestCase):
class TestGitHub(TestCase):
-
layer = ZopelessLayer
def setUp(self):
@@ -401,7 +399,6 @@ class TestGitHub(TestCase):
class TestGitHubUpdateBugWatches(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
@responses.activate
diff --git a/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py b/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py
index a95b998..cb53149 100644
--- a/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py
+++ b/lib/lp/bugs/externalbugtracker/tests/test_gitlab.py
@@ -32,7 +32,6 @@ from lp.testing.layers import ZopelessDatabaseLayer, ZopelessLayer
class TestGitLab(TestCase):
-
layer = ZopelessLayer
def setUp(self):
@@ -292,7 +291,6 @@ class TestGitLab(TestCase):
class TestGitLabUpdateBugWatches(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
@responses.activate
diff --git a/lib/lp/bugs/interfaces/bugsupervisor.py b/lib/lp/bugs/interfaces/bugsupervisor.py
index 7d38ed5..48405fb 100644
--- a/lib/lp/bugs/interfaces/bugsupervisor.py
+++ b/lib/lp/bugs/interfaces/bugsupervisor.py
@@ -15,7 +15,6 @@ from lp.services.fields import PersonChoice
class IHasBugSupervisor(Interface):
-
bug_supervisor = exported(
PersonChoice(
title=_("Bug Supervisor"),
diff --git a/lib/lp/bugs/interfaces/bugtask.py b/lib/lp/bugs/interfaces/bugtask.py
index a8c4e45..3864b76 100644
--- a/lib/lp/bugs/interfaces/bugtask.py
+++ b/lib/lp/bugs/interfaces/bugtask.py
@@ -1301,7 +1301,6 @@ class IAddBugTaskForm(ILinkPackaging):
class IAddBugTaskWithProductCreationForm(ILinkPackaging):
-
bug_url = StrippedTextLine(
title=_("Bug URL"),
required=True,
diff --git a/lib/lp/bugs/interfaces/bugtasksearch.py b/lib/lp/bugs/interfaces/bugtasksearch.py
index f022a72..c78d1cc 100644
--- a/lib/lp/bugs/interfaces/bugtasksearch.py
+++ b/lib/lp/bugs/interfaces/bugtasksearch.py
@@ -191,7 +191,6 @@ class BugTaskSearchParams:
ignore_privacy=False,
ociproject=None,
):
-
self.bug = bug
self.searchtext = searchtext
self.fast_searchtext = fast_searchtext
diff --git a/lib/lp/bugs/interfaces/bugtracker.py b/lib/lp/bugs/interfaces/bugtracker.py
index 3f383e3..6e88264 100644
--- a/lib/lp/bugs/interfaces/bugtracker.py
+++ b/lib/lp/bugs/interfaces/bugtracker.py
@@ -54,7 +54,6 @@ LOCATION_SCHEMES_ALLOWED = "http", "https", "mailto"
class BugTrackerNameField(ContentNameField):
-
errormessage = _("%s is already in use by another bugtracker.")
@property
diff --git a/lib/lp/bugs/interfaces/personsubscriptioninfo.py b/lib/lp/bugs/interfaces/personsubscriptioninfo.py
index 7fd8dd8..47060e2 100644
--- a/lib/lp/bugs/interfaces/personsubscriptioninfo.py
+++ b/lib/lp/bugs/interfaces/personsubscriptioninfo.py
@@ -21,7 +21,6 @@ from lp.services.fields import BugField, PersonChoice
class IAbstractSubscriptionInfo(Interface):
-
bug = BugField(
title=_("Bug"),
readonly=True,
@@ -45,7 +44,6 @@ class IAbstractSubscriptionInfo(Interface):
class IRealSubscriptionInfo(IAbstractSubscriptionInfo):
-
subscription = Attribute(
"The bug subscription. Important attributes for our uses are the "
"target and the bug_notification_level."
@@ -66,7 +64,6 @@ class IRealSubscriptionInfo(IAbstractSubscriptionInfo):
class IVirtualSubscriptionInfo(IAbstractSubscriptionInfo):
-
pillar = Attribute(
"""The pillar for the bugtask. Useful for owner and
bug_supervisor"""
@@ -76,7 +73,6 @@ class IVirtualSubscriptionInfo(IAbstractSubscriptionInfo):
class IAbstractSubscriptionInfoCollection(Interface):
-
count = Attribute("The total number of contained subscriptions.")
personal = Attribute(
diff --git a/lib/lp/bugs/mail/tests/test_commands.py b/lib/lp/bugs/mail/tests/test_commands.py
index 2f775c0..10309a7 100644
--- a/lib/lp/bugs/mail/tests/test_commands.py
+++ b/lib/lp/bugs/mail/tests/test_commands.py
@@ -30,7 +30,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, LaunchpadFunctionalLayer
class AffectsEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test__splitPath_with_slashes(self):
@@ -360,7 +359,6 @@ class AffectsEmailCommandTestCase(TestCaseWithFactory):
class BugEmailCommandTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_execute_bug_id(self):
@@ -406,7 +404,6 @@ class BugEmailCommandTestCase(TestCaseWithFactory):
class PrivateEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug(self):
@@ -449,7 +446,6 @@ class PrivateEmailCommandTestCase(TestCaseWithFactory):
class SecurityEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug(self):
@@ -476,7 +472,6 @@ class SecurityEmailCommandTestCase(TestCaseWithFactory):
class InformationTypeEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug_params(self):
@@ -517,7 +512,6 @@ class InformationTypeEmailCommandTestCase(TestCaseWithFactory):
class SubscribeEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug_with_user_name(self):
@@ -577,7 +571,6 @@ class SubscribeEmailCommandTestCase(TestCaseWithFactory):
class UnsubscribeEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug_with_user_name(self):
@@ -618,7 +611,6 @@ class UnsubscribeEmailCommandTestCase(TestCaseWithFactory):
class SummaryEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug(self):
@@ -643,7 +635,6 @@ class SummaryEmailCommandTestCase(TestCaseWithFactory):
class DuplicateEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug(self):
@@ -670,7 +661,6 @@ class DuplicateEmailCommandTestCase(TestCaseWithFactory):
class CVEEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug(self):
@@ -698,7 +688,6 @@ class CVEEmailCommandTestCase(TestCaseWithFactory):
class TagEmailCommandTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_execute_bug(self):
diff --git a/lib/lp/bugs/model/bug.py b/lib/lp/bugs/model/bug.py
index 5f20232..4ff9c08 100644
--- a/lib/lp/bugs/model/bug.py
+++ b/lib/lp/bugs/model/bug.py
@@ -2082,6 +2082,7 @@ class Bug(SQLBase, InformationTypeMixin):
def getNominations(self, target=None, nominations=None):
"""See `IBug`."""
+
# Define the function used as a sort key.
def by_bugtargetdisplayname(nomination):
"""Return the friendly sort key version of displayname."""
diff --git a/lib/lp/bugs/model/bugnomination.py b/lib/lp/bugs/model/bugnomination.py
index 0d3846c..53e6d99 100644
--- a/lib/lp/bugs/model/bugnomination.py
+++ b/lib/lp/bugs/model/bugnomination.py
@@ -39,7 +39,6 @@ from lp.services.features import getFeatureFlag
@implementer(IBugNomination)
class BugNomination(StormBase):
-
__storm_table__ = "BugNomination"
id = Int(primary=True)
diff --git a/lib/lp/bugs/model/bugtaskflat.py b/lib/lp/bugs/model/bugtaskflat.py
index 16ad071..833fe01 100644
--- a/lib/lp/bugs/model/bugtaskflat.py
+++ b/lib/lp/bugs/model/bugtaskflat.py
@@ -14,7 +14,6 @@ from lp.services.database.stormbase import StormBase
class BugTaskFlat(StormBase):
-
__storm_table__ = "BugTaskFlat"
bugtask_id = Int(name="bugtask", primary=True)
diff --git a/lib/lp/bugs/model/tests/test_bug.py b/lib/lp/bugs/model/tests/test_bug.py
index 1084734..86c291c 100644
--- a/lib/lp/bugs/model/tests/test_bug.py
+++ b/lib/lp/bugs/model/tests/test_bug.py
@@ -42,7 +42,6 @@ from lp.testing.matchers import Equals, HasQueryCount, LessThan
class TestBug(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_getNominationFor_sourcepackage(self):
@@ -678,7 +677,6 @@ class TestBug(TestCaseWithFactory):
class TestBugPrivateAndSecurityRelatedUpdatesProject(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_setPrivate_subscribes_person_who_makes_bug_private(self):
@@ -865,7 +863,6 @@ class TestBugPrivateAndSecurityRelatedUpdatesProject(TestCaseWithFactory):
class TestBugPrivacy(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_multipillar_proprietary_bugs_disallowed(self):
@@ -1062,7 +1059,6 @@ class TestBugPrivacy(TestCaseWithFactory):
class TestBugPrivateAndSecurityRelatedUpdatesSpecialCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_transition_special_cased_for_ubuntu(self):
@@ -1089,7 +1085,6 @@ class TestBugPrivateAndSecurityRelatedUpdatesSpecialCase(TestCaseWithFactory):
class TestBugActivityMethods(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py b/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py
index 28430c3..8acfa75 100644
--- a/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py
+++ b/lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py
@@ -30,7 +30,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestBugSubscriptionFilter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -391,7 +390,6 @@ class TestBugSubscriptionFilter(TestCaseWithFactory):
class TestBugSubscriptionFilterPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -466,7 +464,6 @@ class TestBugSubscriptionFilterPermissions(TestCaseWithFactory):
class TestBugSubscriptionFilterImportance(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -503,7 +500,6 @@ class TestBugSubscriptionFilterImportance(TestCaseWithFactory):
class TestBugSubscriptionFilterStatus(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -538,7 +534,6 @@ class TestBugSubscriptionFilterStatus(TestCaseWithFactory):
class TestBugSubscriptionFilterTag(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -586,7 +581,6 @@ class TestBugSubscriptionFilterTag(TestCaseWithFactory):
class TestBugSubscriptionFilterInformationType(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py b/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py
index 34b9986..2497c45 100644
--- a/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py
+++ b/lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py
@@ -125,7 +125,6 @@ class TestSubscriptionRelatedSets(TestCaseWithFactory):
class TestBugSubscriptionInfo(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -442,7 +441,6 @@ class TestBugSubscriptionInfo(TestCaseWithFactory):
class TestBugSubscriptionInfoPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test(self):
@@ -467,7 +465,6 @@ class TestBugSubscriptionInfoPermissions(TestCaseWithFactory):
class TestBugSubscriptionInfoQueries(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/model/tests/test_bugsummary.py b/lib/lp/bugs/model/tests/test_bugsummary.py
index 459a6f0..cfa52d1 100644
--- a/lib/lp/bugs/model/tests/test_bugsummary.py
+++ b/lib/lp/bugs/model/tests/test_bugsummary.py
@@ -23,7 +23,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestBugSummary(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/bugs/model/tests/test_bugtask.py b/lib/lp/bugs/model/tests/test_bugtask.py
index c3eb248..77e979b 100644
--- a/lib/lp/bugs/model/tests/test_bugtask.py
+++ b/lib/lp/bugs/model/tests/test_bugtask.py
@@ -960,7 +960,6 @@ class TestBugTaskPrivacy(TestCaseWithFactory):
class TestBugTaskDelta(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1182,7 +1181,6 @@ class TestSimilarBugs(TestCaseWithFactory):
class TestBugTaskPermissionsToSetAssigneeMixin:
-
layer = DatabaseFunctionalLayer
def setUp(self, *args, **kwargs):
@@ -1663,7 +1661,6 @@ class TestBugTaskStatuses(TestCase):
class TestBugTaskContributor(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_non_contributor(self):
@@ -3337,7 +3334,6 @@ class ValidateTargetMixin:
class TestValidateTarget(TestCaseWithFactory, ValidateTargetMixin):
-
layer = DatabaseFunctionalLayer
multi_tenant_test_one_task_only = False
@@ -3590,7 +3586,6 @@ class TestValidateTarget(TestCaseWithFactory, ValidateTargetMixin):
class TestValidateNewTarget(TestCaseWithFactory, ValidateTargetMixin):
-
layer = DatabaseFunctionalLayer
multi_tenant_test_one_task_only = True
@@ -3689,7 +3684,6 @@ class TestWebservice(TestCaseWithFactory):
class TestBugTaskUserHasBugSupervisorPrivileges(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -3780,7 +3774,6 @@ class TestBugTaskUserHasBugSupervisorPrivileges(TestCaseWithFactory):
class TestBugTaskUserHasBugSupervisorPrivilegesContext(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assert_userHasBugSupervisorPrivilegesContext(self, obj):
diff --git a/lib/lp/bugs/model/tests/test_bugtasksearch.py b/lib/lp/bugs/model/tests/test_bugtasksearch.py
index 918dbdd..e16a56b 100644
--- a/lib/lp/bugs/model/tests/test_bugtasksearch.py
+++ b/lib/lp/bugs/model/tests/test_bugtasksearch.py
@@ -124,7 +124,6 @@ class TestProcessOrderBy(TestCase):
class SearchTestBase:
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -785,7 +784,6 @@ class TargetTests:
class DeactivatedProductBugTaskTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1867,7 +1865,6 @@ class QueryBugIDs:
class TestMilestoneDueDateFiltering(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_milestone_date_filters(self):
@@ -2364,7 +2361,6 @@ class TestBugTaskTagSearchClauses(TestCase):
class TestBugTaskSearch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def login(self):
@@ -2520,7 +2516,6 @@ class TestBugTaskSearch(TestCaseWithFactory):
class BugTaskSetSearchTest(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_explicit_blueprint_specified(self):
@@ -2567,7 +2562,6 @@ class TargetLessTestCase(TestCaseWithFactory):
class BaseGetBugPrivacyFilterTermsTests:
-
layer = DatabaseFunctionalLayer
def test_public(self):
diff --git a/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py b/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py
index 7011826..2671e9b 100644
--- a/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py
+++ b/lib/lp/bugs/model/tests/test_personsubscriptioninfo.py
@@ -25,7 +25,6 @@ from lp.testing.matchers import HasQueryCount, Provides
class TestPersonSubscriptionInfo(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/model/tests/test_vulnerability.py b/lib/lp/bugs/model/tests/test_vulnerability.py
index 138e23d..184b5d7 100644
--- a/lib/lp/bugs/model/tests/test_vulnerability.py
+++ b/lib/lp/bugs/model/tests/test_vulnerability.py
@@ -47,7 +47,6 @@ def grant_access_to_non_public_vulnerability(vulnerability, person):
class TestVulnerability(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -490,7 +489,6 @@ class TestVulnerability(TestCaseWithFactory):
class TestVulnerabilityActivity(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_vulnerability_activity_changes(self):
@@ -506,7 +504,6 @@ class TestVulnerabilityActivity(TestCaseWithFactory):
class TestVulnerabilitySet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_VulnerabilitySet_implements_IVulnerabilitySet(self):
diff --git a/lib/lp/bugs/model/tests/test_vulnerabilitysubscription.py b/lib/lp/bugs/model/tests/test_vulnerabilitysubscription.py
index 6d8124c..bcbb63d 100644
--- a/lib/lp/bugs/model/tests/test_vulnerabilitysubscription.py
+++ b/lib/lp/bugs/model/tests/test_vulnerabilitysubscription.py
@@ -14,7 +14,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestVulnerabilitySubscription(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_VulnerabilitySubscription_implements_its_interface(self):
diff --git a/lib/lp/bugs/publisher.py b/lib/lp/bugs/publisher.py
index bdbb00a..dbdc528 100644
--- a/lib/lp/bugs/publisher.py
+++ b/lib/lp/bugs/publisher.py
@@ -25,7 +25,6 @@ from lp.services.webapp.servers import (
@implementer(IFacet)
class BugsFacet:
-
name = "bugs"
rootsite = "bugs"
text = "Bugs"
diff --git a/lib/lp/bugs/scripts/bugsummaryrebuild.py b/lib/lp/bugs/scripts/bugsummaryrebuild.py
index 21003b4..088ce97 100644
--- a/lib/lp/bugs/scripts/bugsummaryrebuild.py
+++ b/lib/lp/bugs/scripts/bugsummaryrebuild.py
@@ -427,7 +427,6 @@ def calculate_bugsummary_rows(target):
class BugSummaryRebuildTunableLoop(TunableLoop):
-
maximum_chunk_size = 100
def __init__(self, log, dry_run, abort_time=None):
diff --git a/lib/lp/bugs/scripts/checkwatches/core.py b/lib/lp/bugs/scripts/checkwatches/core.py
index 63a4546..9589bd4 100644
--- a/lib/lp/bugs/scripts/checkwatches/core.py
+++ b/lib/lp/bugs/scripts/checkwatches/core.py
@@ -758,7 +758,7 @@ class SerialScheduler(BaseScheduler):
def run(self):
jobs, self._jobs = self._jobs[:], []
- for (func, args, kwargs) in jobs:
+ for func, args, kwargs in jobs:
func(*args, **kwargs)
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_base.py b/lib/lp/bugs/scripts/checkwatches/tests/test_base.py
index bf6c274..791031c 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_base.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_base.py
@@ -31,7 +31,6 @@ class StubTransactionManager:
class TestWorkingBase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -147,7 +146,6 @@ class TestWorkingBase(TestCaseWithFactory):
class TestWorkingBaseErrorReporting(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
@contextmanager
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_core.py b/lib/lp/bugs/scripts/checkwatches/tests/test_core.py
index 7b6315c..6a73e33 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_core.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_core.py
@@ -78,7 +78,6 @@ class NoBugWatchesByRemoteBugUpdater(RemoteBugUpdater):
class TestCheckwatchesWithSyncableGnomeProducts(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -166,7 +165,6 @@ class TestCheckwatchesWithSyncableGnomeProducts(TestCaseWithFactory):
class BrokenCheckwatchesMaster(CheckwatchesMaster):
-
error_code = None
def _getExternalBugTrackersAndWatches(self, bug_tracker, bug_watches):
@@ -176,7 +174,6 @@ class BrokenCheckwatchesMaster(CheckwatchesMaster):
class TestCheckwatchesMaster(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py b/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py
index 4e322d9..0f36089 100644
--- a/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py
+++ b/lib/lp/bugs/scripts/checkwatches/tests/test_remotebugupdater.py
@@ -36,7 +36,6 @@ class ImportanceConvertingExternalBugTracker(TestExternalBugTracker):
class RemoteBugUpdaterTestCase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makeUpdater(
diff --git a/lib/lp/bugs/scripts/tests/test_bugnotification.py b/lib/lp/bugs/scripts/tests/test_bugnotification.py
index a863751..99d9197 100644
--- a/lib/lp/bugs/scripts/tests/test_bugnotification.py
+++ b/lib/lp/bugs/scripts/tests/test_bugnotification.py
@@ -672,7 +672,6 @@ class TestNotificationBatches(unittest.TestCase):
class EmailNotificationTestBase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -726,7 +725,6 @@ class EmailNotificationTestBase(TestCaseWithFactory):
class EmailNotificationsBugMixin:
-
change_class = None # type: Optional[Type[Any]]
change_name = None # type: Optional[str]
old = None # type: Any
@@ -820,7 +818,6 @@ class EmailNotificationsBugTaskMixin(EmailNotificationsBugMixin):
class EmailNotificationsAddedRemovedMixin:
-
old = new = added_message = removed_message = b""
def add(self, item):
@@ -854,7 +851,6 @@ class EmailNotificationsAddedRemovedMixin:
class TestEmailNotificationsBugTitle(
EmailNotificationsBugMixin, EmailNotificationTestBase
):
-
change_class = BugTitleChange
change_name = "title"
old = "Old summary"
@@ -866,7 +862,6 @@ class TestEmailNotificationsBugTitle(
class TestEmailNotificationsBugTags(
EmailNotificationsBugMixin, EmailNotificationTestBase
):
-
change_class = BugTagsChange
change_name = "tags"
old = ["foo", "bar", "baz"]
@@ -885,7 +880,6 @@ class TestEmailNotificationsBugTags(
class TestEmailNotificationsBugDuplicate(
EmailNotificationsBugNotRequiredMixin, EmailNotificationTestBase
):
-
change_class = BugDuplicateChange
change_name = "duplicateof"
unexpected_bytes = b"duplicate"
@@ -902,7 +896,6 @@ class TestEmailNotificationsBugDuplicate(
class TestEmailNotificationsBugTaskStatus(
EmailNotificationsBugTaskMixin, EmailNotificationTestBase
):
-
change_class = BugTaskStatusChange
change_name = "status"
old = BugTaskStatus.TRIAGED
@@ -914,7 +907,6 @@ class TestEmailNotificationsBugTaskStatus(
class TestEmailNotificationsBugWatch(
EmailNotificationsAddedRemovedMixin, EmailNotificationTestBase
):
-
# Note that this is for bugwatches added to bugs. Bugwatches added
# to bugtasks are separate animals AIUI, and we don't try to combine
# them here for notifications. Bugtasks have only zero or one
@@ -957,7 +949,6 @@ class TestEmailNotificationsBugWatch(
class TestEmailNotificationsBranch(
EmailNotificationsAddedRemovedMixin, EmailNotificationTestBase
):
-
added_message = b"** Branch linked:"
removed_message = b"** Branch unlinked:"
@@ -988,7 +979,6 @@ class TestEmailNotificationsBranch(
class TestEmailNotificationsCVE(
EmailNotificationsAddedRemovedMixin, EmailNotificationTestBase
):
-
added_message = b"** CVE added:"
removed_message = b"** CVE removed:"
@@ -1015,7 +1005,6 @@ class TestEmailNotificationsCVE(
class TestEmailNotificationsAttachments(
EmailNotificationsAddedRemovedMixin, EmailNotificationTestBase
):
-
added_message = b"** Attachment added:"
removed_message = b"** Attachment removed:"
@@ -1316,7 +1305,6 @@ class TestEmailNotificationsWithFiltersWhenBugCreated(TestCaseWithFactory):
class TestManageNotificationsMessage(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_manage_notifications_message_is_included(self):
@@ -1355,7 +1343,6 @@ class TestNotificationSignatureSeparator(TestCase):
class TestExpandedNotificationFooters(EmailNotificationTestBase):
-
layer = LaunchpadZopelessLayer
def test_expanded_footer(self):
@@ -1392,7 +1379,6 @@ class TestExpandedNotificationFooters(EmailNotificationTestBase):
class TestDeferredNotifications(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -1448,7 +1434,6 @@ class BrokenMailer(TestMailer):
class TestSendBugNotifications(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -1575,7 +1560,6 @@ class TestSendBugNotifications(TestCaseWithFactory):
)
def test_team_subscription_with_multiple_filters(self):
-
team_owner = self.factory.makePerson(email="team-owner@xxxxxxxxxxxxx")
bug_watcher = self.factory.makePerson(
diff --git a/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py b/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py
index cf78d8c..0449135 100644
--- a/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py
+++ b/lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py
@@ -74,7 +74,6 @@ def create_tasks(factory):
class TestBugSummaryRebuild(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_get_bugsummary_targets(self):
@@ -191,7 +190,6 @@ class TestBugSummaryRebuild(TestCaseWithFactory):
class TestGetBugSummaryRows(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_get_bugsummary_rows(self):
@@ -208,7 +206,6 @@ class TestGetBugSummaryRows(TestCaseWithFactory):
class TestCalculateBugSummaryRows(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_public_untagged(self):
@@ -498,7 +495,6 @@ class TestCalculateBugSummaryRows(TestCaseWithFactory):
class TestFormatTarget(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_product(self):
diff --git a/lib/lp/bugs/scripts/tests/test_uct.py b/lib/lp/bugs/scripts/tests/test_uct.py
index 737a89f..c6aa91f 100644
--- a/lib/lp/bugs/scripts/tests/test_uct.py
+++ b/lib/lp/bugs/scripts/tests/test_uct.py
@@ -30,7 +30,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestUCTRecord(TestCase):
-
maxDiff = None
def test_load_save(self):
@@ -173,7 +172,6 @@ class TestUCTRecord(TestCase):
class TestCVE(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
maxDiff = None
@@ -508,7 +506,6 @@ class TestCVE(TestCaseWithFactory):
class TestUCTImporterExporter(TestCaseWithFactory):
-
maxDiff = None
layer = ZopelessDatabaseLayer
diff --git a/lib/lp/bugs/scripts/uct/models.py b/lib/lp/bugs/scripts/uct/models.py
index d9f92a2..71f6c74 100644
--- a/lib/lp/bugs/scripts/uct/models.py
+++ b/lib/lp/bugs/scripts/uct/models.py
@@ -585,7 +585,6 @@ class CVE:
)
for uct_package_status in uct_package.statuses:
-
if uct_package_status.status not in cls.BUG_TASK_STATUS_MAP:
logger.warning(
"Can't find a suitable bug task status for %s",
diff --git a/lib/lp/bugs/security.py b/lib/lp/bugs/security.py
index 11d74e9..4d961ac 100644
--- a/lib/lp/bugs/security.py
+++ b/lib/lp/bugs/security.py
@@ -324,7 +324,6 @@ class ViewBugActivity(DelegatedAuthorization):
class ViewBugSubscription(AnonymousAuthorization):
-
usedfor = IBugSubscription
@@ -350,7 +349,6 @@ class EditBugSubscription(AuthorizationBase):
class ViewBugMessage(AnonymousAuthorization):
-
usedfor = IMessage
diff --git a/lib/lp/bugs/subscribers/tests/test_bug.py b/lib/lp/bugs/subscribers/tests/test_bug.py
index 7749c3b..f08f31b 100644
--- a/lib/lp/bugs/subscribers/tests/test_bug.py
+++ b/lib/lp/bugs/subscribers/tests/test_bug.py
@@ -23,7 +23,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class BugSubscriberTestCase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_apportjob.py b/lib/lp/bugs/tests/test_apportjob.py
index 96cd204..c22cfed 100644
--- a/lib/lp/bugs/tests/test_apportjob.py
+++ b/lib/lp/bugs/tests/test_apportjob.py
@@ -334,7 +334,6 @@ class ProcessApportBlobJobTestCase(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_ProcessApportBlobJob(self):
diff --git a/lib/lp/bugs/tests/test_bug_messages_webservice.py b/lib/lp/bugs/tests/test_bug_messages_webservice.py
index d8a77a1..0e220ed 100644
--- a/lib/lp/bugs/tests/test_bug_messages_webservice.py
+++ b/lib/lp/bugs/tests/test_bug_messages_webservice.py
@@ -84,7 +84,6 @@ class TestMessageTraversal(TestCaseWithFactory):
class TestBugMessage(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_attachments(self):
diff --git a/lib/lp/bugs/tests/test_bug_notification_recipients.py b/lib/lp/bugs/tests/test_bug_notification_recipients.py
index 7e99241..30f5a8f 100644
--- a/lib/lp/bugs/tests/test_bug_notification_recipients.py
+++ b/lib/lp/bugs/tests/test_bug_notification_recipients.py
@@ -23,7 +23,6 @@ from lp.testing.matchers import HasQueryCount
class TestBugNotificationRecipients(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getFreshRecipients(self, bug):
diff --git a/lib/lp/bugs/tests/test_bugbranch.py b/lib/lp/bugs/tests/test_bugbranch.py
index 77a0934..76cacdc 100644
--- a/lib/lp/bugs/tests/test_bugbranch.py
+++ b/lib/lp/bugs/tests/test_bugbranch.py
@@ -19,7 +19,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestBugBranchSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_bugbranchset_provides_IBugBranchSet(self):
@@ -148,7 +147,6 @@ class TestBugBranchSet(TestCaseWithFactory):
class TestBugBranch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_bugchanges.py b/lib/lp/bugs/tests/test_bugchanges.py
index 3c55ed3..1067d89 100644
--- a/lib/lp/bugs/tests/test_bugchanges.py
+++ b/lib/lp/bugs/tests/test_bugchanges.py
@@ -31,7 +31,6 @@ from lp.testing.pages import webservice_for_person
class TestBugChanges(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_bugnomination.py b/lib/lp/bugs/tests/test_bugnomination.py
index 7fa1c76..19c0a15 100644
--- a/lib/lp/bugs/tests/test_bugnomination.py
+++ b/lib/lp/bugs/tests/test_bugnomination.py
@@ -27,7 +27,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class BugNominationTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implementation(self):
@@ -307,7 +306,6 @@ class TestBugCanBeNominatedForDistroSeries(
class TestCanApprove(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_normal_user_cannot_approve(self):
@@ -458,7 +456,6 @@ class TestCanApprove(TestCaseWithFactory):
class BugNominationSetTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_get(self):
diff --git a/lib/lp/bugs/tests/test_bugs_webservice.py b/lib/lp/bugs/tests/test_bugs_webservice.py
index 29be4de..6851520 100644
--- a/lib/lp/bugs/tests/test_bugs_webservice.py
+++ b/lib/lp/bugs/tests/test_bugs_webservice.py
@@ -186,7 +186,6 @@ class TestBugCommentRepresentation(TestCaseWithFactory):
class TestBugScaling(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_attachments_query_counts_constant(self):
@@ -265,7 +264,6 @@ class TestBugScaling(TestCaseWithFactory):
class TestBugMessages(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -359,7 +357,6 @@ class TestPostBugWithLargeCollections(TestCaseWithFactory):
class TestErrorHandling(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_add_duplicate_bugtask_for_project_gives_bad_request(self):
@@ -425,7 +422,6 @@ class TestErrorHandling(TestCaseWithFactory):
class BugSetTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeAPITarget(self, bug_policy):
@@ -481,7 +477,6 @@ class BugSetTestCase(TestCaseWithFactory):
class TestBugDateLastUpdated(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def make_old_bug(self):
diff --git a/lib/lp/bugs/tests/test_bugtaskfilter.py b/lib/lp/bugs/tests/test_bugtaskfilter.py
index 6c96281..fc87206 100644
--- a/lib/lp/bugs/tests/test_bugtaskfilter.py
+++ b/lib/lp/bugs/tests/test_bugtaskfilter.py
@@ -12,7 +12,6 @@ from lp.testing.matchers import HasQueryCount
class TestFilterBugTasksByContext(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_simple_case(self):
diff --git a/lib/lp/bugs/tests/test_bugtaskflat_triggers.py b/lib/lp/bugs/tests/test_bugtaskflat_triggers.py
index 8330111..c62f7eb 100644
--- a/lib/lp/bugs/tests/test_bugtaskflat_triggers.py
+++ b/lib/lp/bugs/tests/test_bugtaskflat_triggers.py
@@ -138,7 +138,6 @@ class BugTaskFlatTestMixin(TestCaseWithFactory):
class TestBugTaskFlatten(BugTaskFlatTestMixin):
-
layer = DatabaseFunctionalLayer
def test_create(self):
@@ -304,7 +303,6 @@ class TestBugTaskFlatten(BugTaskFlatTestMixin):
class TestBugTaskFlatTriggers(BugTaskFlatTestMixin):
-
layer = DatabaseFunctionalLayer
def test_bugtask_create(self):
diff --git a/lib/lp/bugs/tests/test_bugtracker.py b/lib/lp/bugs/tests/test_bugtracker.py
index 3d60dd7..6bb19ca 100644
--- a/lib/lp/bugs/tests/test_bugtracker.py
+++ b/lib/lp/bugs/tests/test_bugtracker.py
@@ -37,7 +37,6 @@ from lp.testing.sampledata import ADMIN_EMAIL
class TestBugTrackerSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_trackers(self):
diff --git a/lib/lp/bugs/tests/test_bugtracker_components.py b/lib/lp/bugs/tests/test_bugtracker_components.py
index 3194101..3da7150 100644
--- a/lib/lp/bugs/tests/test_bugtracker_components.py
+++ b/lib/lp/bugs/tests/test_bugtracker_components.py
@@ -13,7 +13,6 @@ __all__ = [] # type: List[str]
class BugTrackerComponentTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self, *args, **kwargs):
@@ -99,7 +98,6 @@ class BugTrackerComponentTestCase(TestCaseWithFactory):
class TestBugTrackerWithComponents(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -186,7 +184,6 @@ class TestBugTrackerWithComponents(TestCaseWithFactory):
class TestWebservice(TestCaseWithFactory):
-
layer = AppServerLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_bugtracker_vocabulary.py b/lib/lp/bugs/tests/test_bugtracker_vocabulary.py
index 57c8bfb..7b01697 100644
--- a/lib/lp/bugs/tests/test_bugtracker_vocabulary.py
+++ b/lib/lp/bugs/tests/test_bugtracker_vocabulary.py
@@ -11,7 +11,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestBugTrackerVocabulary(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -94,7 +93,6 @@ class TestBugTrackerVocabulary(TestCaseWithFactory):
class TestWebBugTrackerVocabulary(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_bugwatch.py b/lib/lp/bugs/tests/test_bugwatch.py
index 8cf900d..a684b0f 100644
--- a/lib/lp/bugs/tests/test_bugwatch.py
+++ b/lib/lp/bugs/tests/test_bugwatch.py
@@ -404,7 +404,6 @@ class EmailAddressExtractBugTrackerAndBugTest(ExtractBugTrackerAndBugTest):
class TestBugWatch(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_bugtasks_to_update(self):
@@ -671,7 +670,6 @@ class TestBugWatchSetBulkOperations(TestCaseWithFactory):
class TestBugWatchBugTasks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -725,7 +723,6 @@ class TestBugWatchActivityPruner(TestCaseWithFactory):
class TestBugWatchResetting(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_bzremotecomponentfinder.py b/lib/lp/bugs/tests/test_bzremotecomponentfinder.py
index 78abb69..47480f2 100644
--- a/lib/lp/bugs/tests/test_bzremotecomponentfinder.py
+++ b/lib/lp/bugs/tests/test_bzremotecomponentfinder.py
@@ -33,7 +33,6 @@ def read_test_file(name):
class TestBugzillaRemoteComponentScraper(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -89,7 +88,6 @@ class TestBugzillaRemoteComponentScraper(TestCaseWithFactory):
class TestBugzillaRemoteComponentFinder(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_cve.py b/lib/lp/bugs/tests/test_cve.py
index c3e7c4f..e444ead 100644
--- a/lib/lp/bugs/tests/test_cve.py
+++ b/lib/lp/bugs/tests/test_cve.py
@@ -110,7 +110,6 @@ class TestCveSet(TestCaseWithFactory):
class TestBugLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_link_and_unlink(self):
diff --git a/lib/lp/bugs/tests/test_structuralsubscription.py b/lib/lp/bugs/tests/test_structuralsubscription.py
index d839266..ce1f712 100644
--- a/lib/lp/bugs/tests/test_structuralsubscription.py
+++ b/lib/lp/bugs/tests/test_structuralsubscription.py
@@ -36,7 +36,6 @@ RESULT_SETS = ResultSet, EmptyResultSet, DecoratedResultSet
class TestStructuralSubscription(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -485,7 +484,6 @@ class TestStructuralSubscriptionFiltersForProductSeries(
class TestGetStructuralSubscriptionTargets(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_product_target(self):
@@ -571,7 +569,6 @@ class TestGetStructuralSubscriptionTargets(TestCaseWithFactory):
class TestGetStructuralSubscriptionsForBug(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -677,7 +674,6 @@ class TestGetStructuralSubscriptionsForBug(TestCaseWithFactory):
class TestGetStructuralSubscriptions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def make_product_with_bug(self):
@@ -772,7 +768,6 @@ class TestGetStructuralSubscriptions(TestCaseWithFactory):
class TestGetStructuralSubscribers(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def make_product_with_bug(self):
diff --git a/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py b/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py
index a9ee89a..9eb6933 100644
--- a/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py
+++ b/lib/lp/bugs/tests/test_structuralsubscriptiontarget.py
@@ -190,7 +190,6 @@ class UnrestrictedStructuralSubscriptionTestBase(
class TestStructuralSubscriptionForDistro(
RestrictedStructuralSubscriptionTestBase, TestCaseWithFactory
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -266,7 +265,6 @@ class TestStructuralSubscriptionForDistro(
class TestStructuralSubscriptionForProduct(
UnrestrictedStructuralSubscriptionTestBase, TestCaseWithFactory
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -277,7 +275,6 @@ class TestStructuralSubscriptionForProduct(
class TestStructuralSubscriptionForDistroSourcePackage(
UnrestrictedStructuralSubscriptionTestBase, TestCaseWithFactory
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -289,7 +286,6 @@ class TestStructuralSubscriptionForDistroSourcePackage(
class TestStructuralSubscriptionForMilestone(
UnrestrictedStructuralSubscriptionTestBase, TestCaseWithFactory
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -301,7 +297,6 @@ class TestStructuralSubscriptionForMilestone(
class TestStructuralSubscriptionForDistroSeries(
UnrestrictedStructuralSubscriptionTestBase, TestCaseWithFactory
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -313,7 +308,6 @@ class TestStructuralSubscriptionForDistroSeries(
class TestStructuralSubscriptionForProjectGroup(
UnrestrictedStructuralSubscriptionTestBase, TestCaseWithFactory
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -325,7 +319,6 @@ class TestStructuralSubscriptionForProjectGroup(
class TestStructuralSubscriptionForProductSeries(
UnrestrictedStructuralSubscriptionTestBase, TestCaseWithFactory
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -477,7 +470,6 @@ class TestStructuralSubscriptionTargetHelper(TestCaseWithFactory):
class TestGetAllStructuralSubscriptionsForTarget(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/bugs/tests/test_vulnerability.py b/lib/lp/bugs/tests/test_vulnerability.py
index 3289b07..0cec967 100644
--- a/lib/lp/bugs/tests/test_vulnerability.py
+++ b/lib/lp/bugs/tests/test_vulnerability.py
@@ -19,7 +19,6 @@ from lp.testing.pages import webservice_for_person
class TestVulnerabilityWebService(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_editing_an_existing_vulnerability_attributes(self):
diff --git a/lib/lp/bugs/tests/test_yuitests.py b/lib/lp/bugs/tests/test_yuitests.py
index 431fbd9..7ba7c62 100644
--- a/lib/lp/bugs/tests/test_yuitests.py
+++ b/lib/lp/bugs/tests/test_yuitests.py
@@ -11,7 +11,6 @@ __all__ = [] # type: List[str]
class BugsYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "BugsYUIUnitTests"
diff --git a/lib/lp/bugs/vocabularies.py b/lib/lp/bugs/vocabularies.py
index d6480bf..9b337e0 100644
--- a/lib/lp/bugs/vocabularies.py
+++ b/lib/lp/bugs/vocabularies.py
@@ -86,7 +86,6 @@ class UsesBugsDistributionVocabulary(DistributionVocabulary):
class BugVocabulary(SQLObjectVocabularyBase):
-
_table = Bug
_orderBy = "id"
diff --git a/lib/lp/buildmaster/browser/tests/test_builder.py b/lib/lp/buildmaster/browser/tests/test_builder.py
index e74b3ed..a582dc7 100644
--- a/lib/lp/buildmaster/browser/tests/test_builder.py
+++ b/lib/lp/buildmaster/browser/tests/test_builder.py
@@ -38,7 +38,6 @@ def builders_homepage_render():
class TestBuilderSetNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_binary_package_build_api_redirects(self):
@@ -122,7 +121,6 @@ class TestBuilderSetNavigation(TestCaseWithFactory):
class TestBuildersHomepage(TestCaseWithFactory, BuildCreationMixin):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/buildmaster/browser/tests/test_builder_views.py b/lib/lp/buildmaster/browser/tests/test_builder_views.py
index 8bfb548..98446e2 100644
--- a/lib/lp/buildmaster/browser/tests/test_builder_views.py
+++ b/lib/lp/buildmaster/browser/tests/test_builder_views.py
@@ -34,7 +34,6 @@ from lp.translations.interfaces.translationtemplatesbuild import (
class TestgetSpecificJobs(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def createTranslationTemplateBuild(self):
@@ -158,7 +157,6 @@ class BuildCreationMixin:
class TestBuilderHistoryView(TestCaseWithFactory, BuildCreationMixin):
-
layer = LaunchpadFunctionalLayer
nb_objects = 2
diff --git a/lib/lp/buildmaster/downloader.py b/lib/lp/buildmaster/downloader.py
index 4c9fa13..68aab4d 100644
--- a/lib/lp/buildmaster/downloader.py
+++ b/lib/lp/buildmaster/downloader.py
@@ -25,7 +25,6 @@ from twisted.protocols import amp
class DownloadCommand(amp.Command):
-
arguments = [
(b"file_url", amp.Unicode()),
(b"path_to_write", amp.Unicode()),
@@ -39,7 +38,6 @@ class DownloadCommand(amp.Command):
class RequestProxyTokenCommand(amp.Command):
-
arguments = [
(b"url", amp.Unicode()),
(b"auth_header", amp.String()),
diff --git a/lib/lp/buildmaster/enums.py b/lib/lp/buildmaster/enums.py
index ad32e14..ee1d90c 100644
--- a/lib/lp/buildmaster/enums.py
+++ b/lib/lp/buildmaster/enums.py
@@ -286,7 +286,6 @@ class BuildQueueStatus(DBEnumeratedType):
class BuilderCleanStatus(DBEnumeratedType):
-
CLEAN = DBItem(
0,
"""
@@ -316,7 +315,6 @@ class BuilderCleanStatus(DBEnumeratedType):
class BuilderResetProtocol(DBEnumeratedType):
-
PROTO_1_1 = DBItem(
11,
"""
diff --git a/lib/lp/buildmaster/interfaces/builder.py b/lib/lp/buildmaster/interfaces/builder.py
index afca0b3..d81c01c 100644
--- a/lib/lp/buildmaster/interfaces/builder.py
+++ b/lib/lp/buildmaster/interfaces/builder.py
@@ -119,7 +119,6 @@ class IBuilderModerateAttributes(Interface):
class IBuilderView(IHasBuildRecords, IHasOwner):
-
id = Attribute("Builder identifier")
processor = exported(
diff --git a/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py b/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py
index 7fdf254..bdb07b6 100644
--- a/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py
+++ b/lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py
@@ -149,7 +149,6 @@ BuildArgs = TypedDict(
class IBuildFarmJobBehaviour(Interface):
-
builder_type = Attribute(
"The name of the builder type to use for this build, corresponding "
"to a launchpad-buildd build manager tag."
diff --git a/lib/lp/buildmaster/manager.py b/lib/lp/buildmaster/manager.py
index 17c90a6..7f2b870 100644
--- a/lib/lp/buildmaster/manager.py
+++ b/lib/lp/buildmaster/manager.py
@@ -166,7 +166,6 @@ class PrefetchedBuildCandidates:
class BaseBuilderFactory:
-
date_updated = None
def update(self):
diff --git a/lib/lp/buildmaster/queuedepth.py b/lib/lp/buildmaster/queuedepth.py
index 702af11..05adfa1 100644
--- a/lib/lp/buildmaster/queuedepth.py
+++ b/lib/lp/buildmaster/queuedepth.py
@@ -228,6 +228,7 @@ def estimate_job_delay(bq, builder_stats):
:return: An integer value holding the sum of delays (in seconds)
caused by the jobs that are ahead of and competing with the JOI.
"""
+
# XXX: This is broken with multi-Processor buildds, as it only
# considers competition from the same processor.
def jobs_compete_for_builders(a, b):
diff --git a/lib/lp/buildmaster/tests/test_builder.py b/lib/lp/buildmaster/tests/test_builder.py
index f122c43..333ca03 100644
--- a/lib/lp/buildmaster/tests/test_builder.py
+++ b/lib/lp/buildmaster/tests/test_builder.py
@@ -417,7 +417,6 @@ class TestFindBuildCandidatesGeneralCases(TestFindBuildCandidatesBase):
class TestFindBuildCandidatesPPABase(TestFindBuildCandidatesBase):
-
ppa_joe_private = False
ppa_jim_private = False
@@ -531,7 +530,6 @@ class TestFindBuildCandidatesPPA(TestFindBuildCandidatesPPABase):
class TestFindBuildCandidatesPrivatePPA(TestFindBuildCandidatesPPABase):
-
ppa_joe_private = True
def test_findBuildCandidate_for_private_ppa(self):
diff --git a/lib/lp/buildmaster/tests/test_buildfarmjob.py b/lib/lp/buildmaster/tests/test_buildfarmjob.py
index e0973fe..8b8739b 100644
--- a/lib/lp/buildmaster/tests/test_buildfarmjob.py
+++ b/lib/lp/buildmaster/tests/test_buildfarmjob.py
@@ -31,7 +31,6 @@ from lp.testing.layers import (
class TestBuildFarmJobBase:
-
layer = DatabaseFunctionalLayer # type: Type[BaseLayer]
def setUp(self, *args, **kwargs):
@@ -225,7 +224,6 @@ class TestBuildFarmJobMixin(TestCaseWithFactory):
class TestBuildFarmJobSet(TestBuildFarmJobBase, TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py b/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py
index a164b11..11c6a3e 100644
--- a/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py
+++ b/lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py
@@ -173,7 +173,6 @@ class TestBuildFarmJobBehaviourBase(TestCaseWithFactory):
class TestDispatchBuildToWorker(StatsMixin, TestCase):
-
layer = ZopelessLayer
run_tests_with = AsynchronousDeferredRunTest
diff --git a/lib/lp/buildmaster/tests/test_interactor.py b/lib/lp/buildmaster/tests/test_interactor.py
index dc45dcc..d209b41 100644
--- a/lib/lp/buildmaster/tests/test_interactor.py
+++ b/lib/lp/buildmaster/tests/test_interactor.py
@@ -106,7 +106,6 @@ class MockBuilderFactory(BaseBuilderFactory):
class TestBuilderInteractor(TestCase):
-
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
def setUp(self):
@@ -172,7 +171,6 @@ class TestBuilderInteractor(TestCase):
class TestBuilderInteractorCleanWorker(TestCase):
-
run_tests_with = AsynchronousDeferredRunTest
@defer.inlineCallbacks
diff --git a/lib/lp/buildmaster/tests/test_manager.py b/lib/lp/buildmaster/tests/test_manager.py
index a0edb84..b87e95c 100644
--- a/lib/lp/buildmaster/tests/test_manager.py
+++ b/lib/lp/buildmaster/tests/test_manager.py
@@ -697,7 +697,6 @@ class TestWorkerScannerScan(StatsMixin, TestCaseWithFactory):
class TestWorkerScannerWithLibrarian(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=20)
@@ -827,7 +826,6 @@ class TestWorkerScannerWithLibrarian(TestCaseWithFactory):
class TestPrefetchedBuilderFactory(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_get(self):
@@ -1021,7 +1019,6 @@ class FakeBuilddManager:
class TestWorkerScannerWithoutDB(TestCase):
-
layer = ZopelessDatabaseLayer
run_tests_with = AsynchronousDeferredRunTest
@@ -1320,7 +1317,6 @@ class TestCancellationChecking(TestCaseWithFactory):
class TestBuilddManager(TestCase):
-
layer = LaunchpadZopelessLayer
def _stub_out_scheduleNextScanCycle(self):
@@ -1386,7 +1382,6 @@ class TestBuilddManager(TestCase):
class TestFailureAssessmentsAndStatsdMetrics(StatsMixin, TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -1850,7 +1845,6 @@ def is_file_growing(filepath, poll_interval=1, poll_repeat=10):
class TestBuilddManagerScript(TestCaseWithFactory):
-
layer = LaunchpadScriptLayer
def testBuilddManagerRuns(self):
diff --git a/lib/lp/buildmaster/tests/test_vocabularies.py b/lib/lp/buildmaster/tests/test_vocabularies.py
index f644a43..f7de6a4 100644
--- a/lib/lp/buildmaster/tests/test_vocabularies.py
+++ b/lib/lp/buildmaster/tests/test_vocabularies.py
@@ -9,7 +9,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestBuilderResourceVocabulary(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_provides_interface(self):
diff --git a/lib/lp/buildmaster/vocabularies.py b/lib/lp/buildmaster/vocabularies.py
index 154e445..d6a439c 100644
--- a/lib/lp/buildmaster/vocabularies.py
+++ b/lib/lp/buildmaster/vocabularies.py
@@ -22,7 +22,6 @@ from lp.services.webapp.vocabulary import NamedSQLObjectVocabulary
class ProcessorVocabulary(NamedSQLObjectVocabulary):
-
displayname = "Select a processor"
_table = Processor
_orderBy = "name"
diff --git a/lib/lp/charms/adapters/tests/test_buildarch.py b/lib/lp/charms/adapters/tests/test_buildarch.py
index c7659ba..a87528d 100644
--- a/lib/lp/charms/adapters/tests/test_buildarch.py
+++ b/lib/lp/charms/adapters/tests/test_buildarch.py
@@ -29,7 +29,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestCharmBaseConfiguration(WithScenarios, TestCase):
-
scenarios = [
(
"expanded",
@@ -118,7 +117,6 @@ class TestCharmBaseConfiguration(WithScenarios, TestCase):
class TestDetermineInstancesToBuild(WithScenarios, TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
# Scenarios taken from the charmcraft build providers specification:
diff --git a/lib/lp/charms/browser/charmrecipe.py b/lib/lp/charms/browser/charmrecipe.py
index 9d2dff3..be6e28a 100644
--- a/lib/lp/charms/browser/charmrecipe.py
+++ b/lib/lp/charms/browser/charmrecipe.py
@@ -234,6 +234,7 @@ def builds_and_requests_for_recipe(recipe):
Builds that the user does not have permission to see are excluded (by
the model code).
"""
+
# We need to interleave items of different types, so SQL can't do all
# the sorting for us.
def make_sort_key(*date_attrs):
@@ -420,7 +421,6 @@ class CharmRecipeAddView(CharmRecipeAuthorizeMixin, LaunchpadFormView):
class BaseCharmRecipeEditView(
CharmRecipeAuthorizeMixin, LaunchpadEditFormView
):
-
schema = ICharmRecipeEditSchema
next_url = None
diff --git a/lib/lp/charms/browser/charmrecipelisting.py b/lib/lp/charms/browser/charmrecipelisting.py
index 4a47a81..384617b 100644
--- a/lib/lp/charms/browser/charmrecipelisting.py
+++ b/lib/lp/charms/browser/charmrecipelisting.py
@@ -22,7 +22,6 @@ from lp.services.webapp.batching import BatchNavigator
class CharmRecipeListingView(LaunchpadView, FeedsMixin):
-
feed_types = ()
source_enabled = True
@@ -54,7 +53,6 @@ class CharmRecipeListingView(LaunchpadView, FeedsMixin):
class GitCharmRecipeListingView(CharmRecipeListingView):
-
source_enabled = False
@property
@@ -65,7 +63,6 @@ class GitCharmRecipeListingView(CharmRecipeListingView):
class PersonCharmRecipeListingView(CharmRecipeListingView):
-
owner_enabled = False
diff --git a/lib/lp/charms/browser/tests/test_charmrecipe.py b/lib/lp/charms/browser/tests/test_charmrecipe.py
index 78bb21a..60c561e 100644
--- a/lib/lp/charms/browser/tests/test_charmrecipe.py
+++ b/lib/lp/charms/browser/tests/test_charmrecipe.py
@@ -76,7 +76,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestCharmRecipeNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -104,7 +103,6 @@ class TestCharmRecipeNavigation(TestCaseWithFactory):
class BaseTestCharmRecipeView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/charms/browser/tests/test_charmrecipebuild.py b/lib/lp/charms/browser/tests/test_charmrecipebuild.py
index 83df915..a105e5d 100644
--- a/lib/lp/charms/browser/tests/test_charmrecipebuild.py
+++ b/lib/lp/charms/browser/tests/test_charmrecipebuild.py
@@ -41,7 +41,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrlForCharmRecipeBuild(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -67,7 +66,6 @@ class TestCanonicalUrlForCharmRecipeBuild(TestCaseWithFactory):
class TestCharmRecipeBuildView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -198,7 +196,6 @@ class TestCharmRecipeBuildView(TestCaseWithFactory):
class TestCharmRecipeBuildOperations(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/charms/browser/tests/test_charmrecipelisting.py b/lib/lp/charms/browser/tests/test_charmrecipelisting.py
index 50e8b0a..a9baeea 100644
--- a/lib/lp/charms/browser/tests/test_charmrecipelisting.py
+++ b/lib/lp/charms/browser/tests/test_charmrecipelisting.py
@@ -28,7 +28,6 @@ from lp.testing.views import create_initialized_view
class TestCharmRecipeListing(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def assertCharmRecipesLink(
diff --git a/lib/lp/charms/browser/tests/test_hascharmrecipes.py b/lib/lp/charms/browser/tests/test_hascharmrecipes.py
index 19adca7..8925eb1 100644
--- a/lib/lp/charms/browser/tests/test_hascharmrecipes.py
+++ b/lib/lp/charms/browser/tests/test_hascharmrecipes.py
@@ -26,7 +26,6 @@ def make_git_ref(test_case):
class TestHasCharmRecipesView(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
scenarios = [
@@ -89,7 +88,6 @@ class TestHasCharmRecipesView(WithScenarios, TestCaseWithFactory):
class TestHasCharmRecipesMenu(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
scenarios = [
diff --git a/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py b/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
index 5a15feb..efc188b 100644
--- a/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
+++ b/lib/lp/charms/browser/widgets/charmrecipebuildchannels.py
@@ -24,7 +24,6 @@ from lp.services.webapp.interfaces import (
@implementer(ISingleLineWidgetLayout, IAlwaysSubmittedWidget, IInputWidget)
class CharmRecipeBuildChannelsWidget(BrowserWidget, InputWidget):
-
template = ViewPageTemplateFile("templates/charmrecipebuildchannels.pt")
hint = False
snap_names = ["charmcraft", "core", "core18", "core20", "core22"]
diff --git a/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py b/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py
index ab4a44c..e253f7f 100644
--- a/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py
+++ b/lib/lp/charms/browser/widgets/tests/test_charmrecipebuildchannelswidget.py
@@ -18,7 +18,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestCharmRecipeBuildChannelsWidget(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/charms/mail/charmrecipebuild.py b/lib/lp/charms/mail/charmrecipebuild.py
index 172d9af..25dd581 100644
--- a/lib/lp/charms/mail/charmrecipebuild.py
+++ b/lib/lp/charms/mail/charmrecipebuild.py
@@ -12,7 +12,6 @@ from lp.services.webapp import canonical_url
class CharmRecipeBuildMailer(BaseMailer):
-
app = "charms"
@classmethod
diff --git a/lib/lp/charms/tests/test_charmbase.py b/lib/lp/charms/tests/test_charmbase.py
index c49bdce..d392e33 100644
--- a/lib/lp/charms/tests/test_charmbase.py
+++ b/lib/lp/charms/tests/test_charmbase.py
@@ -26,7 +26,6 @@ from lp.testing.pages import webservice_for_person
class TestCharmBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_implements_interface(self):
@@ -54,7 +53,6 @@ class TestCharmBase(TestCaseWithFactory):
class TestCharmBaseProcessors(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -108,7 +106,6 @@ class TestCharmBaseProcessors(TestCaseWithFactory):
class TestCharmBaseSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_getByDistroSeries(self):
@@ -133,7 +130,6 @@ class TestCharmBaseSet(TestCaseWithFactory):
class TestCharmBaseWebservice(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_new_unpriv(self):
diff --git a/lib/lp/charms/tests/test_charmhubclient.py b/lib/lp/charms/tests/test_charmhubclient.py
index b951718..c33a955 100644
--- a/lib/lp/charms/tests/test_charmhubclient.py
+++ b/lib/lp/charms/tests/test_charmhubclient.py
@@ -148,7 +148,6 @@ class RequestMatches(MatchesAll):
class TestCharmhubClient(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/charms/tests/test_charmrecipe.py b/lib/lp/charms/tests/test_charmrecipe.py
index 0f3502b..f646124 100644
--- a/lib/lp/charms/tests/test_charmrecipe.py
+++ b/lib/lp/charms/tests/test_charmrecipe.py
@@ -119,7 +119,6 @@ from lp.testing.pages import webservice_for_person
class TestCharmRecipeFeatureFlags(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_feature_flag_disabled(self):
@@ -140,7 +139,6 @@ class TestCharmRecipeFeatureFlags(TestCaseWithFactory):
class TestCharmRecipe(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1020,7 +1018,6 @@ class TestCharmRecipe(TestCaseWithFactory):
class TestCharmRecipeAuthorization(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1215,7 +1212,6 @@ class TestCharmRecipeAuthorization(TestCaseWithFactory):
class TestCharmRecipeDeleteWithBuilds(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -1333,7 +1329,6 @@ class TestCharmRecipeDeleteWithBuilds(TestCaseWithFactory):
class TestCharmRecipeSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1830,7 +1825,6 @@ class TestCharmRecipeSet(TestCaseWithFactory):
class TestCharmRecipeWebservice(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/charms/tests/test_charmrecipebuild.py b/lib/lp/charms/tests/test_charmrecipebuild.py
index cde6235..e3816fe 100644
--- a/lib/lp/charms/tests/test_charmrecipebuild.py
+++ b/lib/lp/charms/tests/test_charmrecipebuild.py
@@ -78,7 +78,6 @@ expected_body = """\
class TestCharmRecipeBuild(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -805,7 +804,6 @@ class TestCharmRecipeBuild(TestCaseWithFactory):
class TestCharmRecipeBuildSet(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -868,7 +866,6 @@ class TestCharmRecipeBuildSet(TestCaseWithFactory):
class TestCharmRecipeBuildWebservice(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py b/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py
index 2851a9f..07eb6e8 100644
--- a/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py
+++ b/lib/lp/charms/tests/test_charmrecipebuildbehaviour.py
@@ -78,7 +78,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestCharmRecipeBuildBehaviourBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -160,7 +159,6 @@ class TestCharmRecipeBuildBehaviour(TestCharmRecipeBuildBehaviourBase):
class TestAsyncCharmRecipeBuildBehaviour(
StatsMixin, TestCharmRecipeBuildBehaviourBase
):
-
run_tests_with = AsynchronousDeferredRunTestForBrokenTwisted.make_factory(
timeout=30
)
diff --git a/lib/lp/charms/tests/test_charmrecipebuildjob.py b/lib/lp/charms/tests/test_charmrecipebuildjob.py
index 0d671f0..87ee452 100644
--- a/lib/lp/charms/tests/test_charmrecipebuildjob.py
+++ b/lib/lp/charms/tests/test_charmrecipebuildjob.py
@@ -95,7 +95,6 @@ class FileUploaded(MatchesListwise):
class TestCharmRecipeBuildJob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -114,7 +113,6 @@ class TestCharmRecipeBuildJob(TestCaseWithFactory):
class TestCharmhubUploadJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/charms/tests/test_charmrecipejob.py b/lib/lp/charms/tests/test_charmrecipejob.py
index 53e4bca..2b33d2e 100644
--- a/lib/lp/charms/tests/test_charmrecipejob.py
+++ b/lib/lp/charms/tests/test_charmrecipejob.py
@@ -46,7 +46,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestCharmRecipeJob(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -63,7 +62,6 @@ class TestCharmRecipeJob(TestCaseWithFactory):
class TestCharmRecipeRequestBuildsJob(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/code/adapters/tests/test_branch.py b/lib/lp/code/adapters/tests/test_branch.py
index 4d83ca1..3bbd844 100644
--- a/lib/lp/code/adapters/tests/test_branch.py
+++ b/lib/lp/code/adapters/tests/test_branch.py
@@ -13,7 +13,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestBranchMergeProposalDelta(TestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/adapters/tests/test_branchcollection.py b/lib/lp/code/adapters/tests/test_branchcollection.py
index a2fdbaa..c547bcd 100644
--- a/lib/lp/code/adapters/tests/test_branchcollection.py
+++ b/lib/lp/code/adapters/tests/test_branchcollection.py
@@ -10,7 +10,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestPersonProduct(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_person_product(self):
diff --git a/lib/lp/code/adapters/tests/test_gitrepository.py b/lib/lp/code/adapters/tests/test_gitrepository.py
index 94282d4..5fc0de1 100644
--- a/lib/lp/code/adapters/tests/test_gitrepository.py
+++ b/lib/lp/code/adapters/tests/test_gitrepository.py
@@ -11,7 +11,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestGitRepositoryDelta(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_no_modification(self):
diff --git a/lib/lp/code/browser/bazaar.py b/lib/lp/code/browser/bazaar.py
index 9a65327..1a751fd 100644
--- a/lib/lp/code/browser/bazaar.py
+++ b/lib/lp/code/browser/bazaar.py
@@ -25,7 +25,6 @@ from lp.services.webapp.authorization import precache_permission_for_objects
class BazaarApplicationView(LaunchpadView):
-
page_title = "Launchpad Branches"
@property
diff --git a/lib/lp/code/browser/branch.py b/lib/lp/code/browser/branch.py
index ae6115a..467a1bc 100644
--- a/lib/lp/code/browser/branch.py
+++ b/lib/lp/code/browser/branch.py
@@ -139,7 +139,6 @@ class BranchBreadcrumb(NameBreadcrumb):
class BranchNavigation(WebhookTargetNavigationMixin, Navigation):
-
usedfor = IBranch
@stepthrough("+bug")
@@ -392,7 +391,6 @@ class BranchView(
HasSnapsViewMixin,
CodeImportTargetMixin,
):
-
feed_types = (BranchFeedLink,)
@property
@@ -642,7 +640,6 @@ class BranchView(
class BranchRescanView(LaunchpadEditFormView):
-
schema = Interface
field_names = []
next_url = None
@@ -1425,7 +1422,6 @@ class RegisterBranchMergeProposalView(LaunchpadFormView):
@implementer(IBrowserPublisher)
class BranchDiffView(DataDownloadView):
-
content_type = "text/x-patch"
def __init__(self, context, request, new, old=None):
diff --git a/lib/lp/code/browser/branchlisting.py b/lib/lp/code/browser/branchlisting.py
index a6a8581..f4b5533 100644
--- a/lib/lp/code/browser/branchlisting.py
+++ b/lib/lp/code/browser/branchlisting.py
@@ -814,7 +814,6 @@ class RecentlyChangedBranchesView(NoContextBranchListingView):
class PersonBranchesMenu(ApplicationMenu):
-
usedfor = IPerson
facet = "branches"
links = ["branches", "active_reviews", "source_package_recipes", "snaps"]
@@ -847,7 +846,6 @@ class PersonBranchesMenu(ApplicationMenu):
class PersonProductBranchesMenu(PersonBranchesMenu):
-
usedfor = IPersonProduct
links = ["branches", "active_reviews", "source_package_recipes", "snaps"]
@@ -1025,7 +1023,6 @@ class PersonProductCodeSummaryView(PersonCodeSummaryView):
class ProductBranchesMenu(ApplicationMenu):
-
usedfor = IProduct
facet = "branches"
links = [
diff --git a/lib/lp/code/browser/branchmergeproposal.py b/lib/lp/code/browser/branchmergeproposal.py
index 6631a94..1e6bda0 100644
--- a/lib/lp/code/browser/branchmergeproposal.py
+++ b/lib/lp/code/browser/branchmergeproposal.py
@@ -1038,7 +1038,6 @@ class BranchMergeProposalVoteView(LaunchpadView):
class BranchMergeProposalScheduleUpdateDiffView(LaunchpadEditFormView):
-
schema = Interface
field_names = []
next_url = None
@@ -1130,7 +1129,6 @@ class MergeProposalEditView(
class ResubmitSchema(IBranchMergeProposal):
-
break_link = Bool(
title="Start afresh",
description=(
@@ -1423,7 +1421,6 @@ class BranchMergeProposalSubscribersView(LaunchpadView):
class BranchMergeProposalChangeStatusView(
MergeProposalEditView, BranchMergeProposalStatusMixin
):
-
page_title = label = "Change merge proposal status"
schema = IBranchMergeProposal
field_names = []
diff --git a/lib/lp/code/browser/branchref.py b/lib/lp/code/browser/branchref.py
index 5d440ca..8723f98 100644
--- a/lib/lp/code/browser/branchref.py
+++ b/lib/lp/code/browser/branchref.py
@@ -30,7 +30,6 @@ class BranchRef:
class BranchRefNavigation(Navigation):
-
usedfor = IBranchRef
@stepto("branch-format")
diff --git a/lib/lp/code/browser/branchsubscription.py b/lib/lp/code/browser/branchsubscription.py
index 2881b03..46b53a5 100644
--- a/lib/lp/code/browser/branchsubscription.py
+++ b/lib/lp/code/browser/branchsubscription.py
@@ -113,7 +113,6 @@ class _BranchSubscriptionView(LaunchpadFormView):
class BranchSubscriptionAddView(_BranchSubscriptionView):
-
page_title = label = "Subscribe to branch"
@action("Subscribe")
diff --git a/lib/lp/code/browser/diff.py b/lib/lp/code/browser/diff.py
index 0e4fd79..cdb7996 100644
--- a/lib/lp/code/browser/diff.py
+++ b/lib/lp/code/browser/diff.py
@@ -19,7 +19,6 @@ from lp.services.webapp.publisher import canonical_url
class PreviewDiffNavigation(Navigation, FileNavigationMixin):
-
usedfor = IPreviewDiff
diff --git a/lib/lp/code/browser/gitlisting.py b/lib/lp/code/browser/gitlisting.py
index f5415f1..2be0c24 100644
--- a/lib/lp/code/browser/gitlisting.py
+++ b/lib/lp/code/browser/gitlisting.py
@@ -110,7 +110,6 @@ class BaseGitListingView(LaunchpadView):
class TargetGitListingView(BaseGitListingView):
-
page_title = "Git"
@property
@@ -129,7 +128,6 @@ class TargetGitListingView(BaseGitListingView):
class PersonTargetGitListingView(BaseGitListingView):
-
page_title = "Git"
@property
@@ -161,7 +159,6 @@ class PersonTargetGitListingView(BaseGitListingView):
class OCIProjectGitListingView(TargetGitListingView):
-
# OCIProject:+branches doesn't exist.
show_bzr_link = False
@@ -169,19 +166,16 @@ class OCIProjectGitListingView(TargetGitListingView):
class PersonDistributionSourcePackageGitListingView(
PersonTargetGitListingView
):
-
# PersonDistributionSourcePackage:+branches doesn't exist.
show_bzr_link = False
class PersonOCIProjectGitListingView(PersonTargetGitListingView):
-
# PersonOCIProject:+branches doesn't exist.
show_bzr_link = False
class PlainGitListingView(BaseGitListingView):
-
page_title = "Git"
target = None
default_git_repository = None
diff --git a/lib/lp/code/browser/gitref.py b/lib/lp/code/browser/gitref.py
index 33f630a..3400ff1 100644
--- a/lib/lp/code/browser/gitref.py
+++ b/lib/lp/code/browser/gitref.py
@@ -107,7 +107,6 @@ class GitRefView(
HasCharmRecipesViewMixin,
HasRevisionStatusReportsMixin,
):
-
# This is set at self.commit_infos, and should be accessed by the view
# as self.commit_info_message.
_commit_info_message = None
diff --git a/lib/lp/code/browser/gitrepository.py b/lib/lp/code/browser/gitrepository.py
index 17056f8..b413c58 100644
--- a/lib/lp/code/browser/gitrepository.py
+++ b/lib/lp/code/browser/gitrepository.py
@@ -149,7 +149,6 @@ class GitRepositoryURL:
class GitRepositoriesBreadcrumb(Breadcrumb):
-
text = "Git"
@property
@@ -172,7 +171,6 @@ class GitRepositoryBreadcrumb(Breadcrumb):
class GitRepositoryNavigation(WebhookTargetNavigationMixin, Navigation):
-
usedfor = IGitRepository
@stepthrough("+status")
@@ -550,7 +548,6 @@ class GitRepositoryView(
class GitRepositoryForkView(LaunchpadEditFormView):
-
schema = Interface
field_names = []
next_url = None
@@ -594,7 +591,6 @@ class GitRepositoryForkView(LaunchpadEditFormView):
class GitRepositoryRescanView(LaunchpadEditFormView):
-
schema = Interface
field_names = []
next_url = None
@@ -942,7 +938,6 @@ class GitRepositoryEditView(CodeEditOwnerMixin, GitRepositoryEditFormView):
@implementer(IBrowserPublisher)
class GitRepositoryDiffView(DataDownloadView):
-
content_type = "text/x-patch"
charset = "UTF-8"
@@ -985,7 +980,6 @@ def decode_form_field_id(encoded):
class GitRulePatternField(UniqueField):
-
errormessage = _("%s is already in use by another rule")
attribute = "ref_pattern"
_content_iface = IGitRepository
@@ -1551,7 +1545,6 @@ class GitRepositoryPermissionsView(LaunchpadFormView):
class GitRepositoryDeletionView(LaunchpadFormView):
-
schema = IGitRepository
field_names = []
next_url = None
@@ -1646,7 +1639,6 @@ class GitRepositoryDeletionView(LaunchpadFormView):
class GitRepositoryActivityView(LaunchpadView):
-
page_title = "Activity"
@property
diff --git a/lib/lp/code/browser/gitsubscription.py b/lib/lp/code/browser/gitsubscription.py
index c6f2b45..5338186 100644
--- a/lib/lp/code/browser/gitsubscription.py
+++ b/lib/lp/code/browser/gitsubscription.py
@@ -112,7 +112,6 @@ class _GitSubscriptionView(LaunchpadFormView):
class GitSubscriptionAddView(_GitSubscriptionView):
-
page_title = label = "Subscribe to repository"
@action("Subscribe")
diff --git a/lib/lp/code/browser/sourcepackagerecipe.py b/lib/lp/code/browser/sourcepackagerecipe.py
index 5bcfd7f..365fbd4 100644
--- a/lib/lp/code/browser/sourcepackagerecipe.py
+++ b/lib/lp/code/browser/sourcepackagerecipe.py
@@ -633,7 +633,6 @@ USE_ARCHIVE_VOCABULARY = SimpleVocabulary(
class ISourcePackageAddSchema(ISourcePackageEditSchema):
-
daily_build_archive = Choice(
vocabulary="TargetPPAs",
title="Daily build archive",
diff --git a/lib/lp/code/browser/sourcepackagerecipebuild.py b/lib/lp/code/browser/sourcepackagerecipebuild.py
index 4a675b1..cb60777 100644
--- a/lib/lp/code/browser/sourcepackagerecipebuild.py
+++ b/lib/lp/code/browser/sourcepackagerecipebuild.py
@@ -32,7 +32,6 @@ from lp.services.webapp import (
class SourcePackageRecipeBuildNavigation(Navigation, FileNavigationMixin):
-
usedfor = ISourcePackageRecipeBuild
diff --git a/lib/lp/code/browser/sourcepackagerecipelisting.py b/lib/lp/code/browser/sourcepackagerecipelisting.py
index 622723d..c68023f 100644
--- a/lib/lp/code/browser/sourcepackagerecipelisting.py
+++ b/lib/lp/code/browser/sourcepackagerecipelisting.py
@@ -31,7 +31,6 @@ class HasRecipesMenuMixin:
class RecipeListingView(LaunchpadView, FeedsMixin):
-
feed_types = ()
branch_enabled = True
@@ -45,7 +44,6 @@ class RecipeListingView(LaunchpadView, FeedsMixin):
class BranchRecipeListingView(RecipeListingView):
-
branch_enabled = False
def initialize(self):
@@ -59,7 +57,6 @@ class BranchRecipeListingView(RecipeListingView):
class PersonRecipeListingView(RecipeListingView):
-
owner_enabled = False
diff --git a/lib/lp/code/browser/tests/test_branch.py b/lib/lp/code/browser/tests/test_branch.py
index e94c52b..e65fc77 100644
--- a/lib/lp/code/browser/tests/test_branch.py
+++ b/lib/lp/code/browser/tests/test_branch.py
@@ -146,7 +146,6 @@ class TestBranchMirrorHidden(TestCaseWithFactory):
class TestBranchView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def testMirrorStatusMessageIsTruncated(self):
@@ -703,7 +702,6 @@ class TestBranchView(BrowserTestCase):
class TestBranchDeletionView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -759,7 +757,6 @@ class TestBranchDeletionView(BrowserTestCase):
class TestBranchRescanView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_owner_can_see_rescan(self):
@@ -1155,7 +1152,6 @@ class TestBranchProposalsVisible(TestCaseWithFactory):
class TestBranchEditView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_branch_target_widget_renders_junk(self):
@@ -1436,7 +1432,6 @@ class TestBranchEditViewInformationTypes(TestCaseWithFactory):
class TestBranchUpgradeView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_upgrade_branch_action_cannot_upgrade(self):
@@ -1459,7 +1454,6 @@ class TestBranchUpgradeView(TestCaseWithFactory):
class TestBranchPrivacyPortlet(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_information_type_in_ui(self):
@@ -1486,7 +1480,6 @@ class TestBranchPrivacyPortlet(TestCaseWithFactory):
class TestBranchDiffView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_feature_disabled(self):
diff --git a/lib/lp/code/browser/tests/test_branchlisting.py b/lib/lp/code/browser/tests/test_branchlisting.py
index bff935e..68bdcc5 100644
--- a/lib/lp/code/browser/tests/test_branchlisting.py
+++ b/lib/lp/code/browser/tests/test_branchlisting.py
@@ -101,7 +101,6 @@ class AjaxBatchNavigationMixin:
class TestPersonOwnedBranchesView(
TestCaseWithFactory, AjaxBatchNavigationMixin
):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -264,7 +263,6 @@ class TestPersonOwnedBranchesView(
class TestSimplifiedPersonBranchesView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -410,7 +408,6 @@ class TestSimplifiedPersonProductBranchesView(
class TestSourcePackageBranchesView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_distroseries_links(self):
@@ -458,7 +455,6 @@ class TestSourcePackageBranchesView(TestCaseWithFactory):
class TestDistributionBranchesView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_git_link(self):
@@ -660,7 +656,6 @@ class TestDevelopmentFocusPackageBranches(TestCaseWithFactory):
class TestProductSeriesTemplate(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_product_series_link(self):
diff --git a/lib/lp/code/browser/tests/test_branchmergeproposal.py b/lib/lp/code/browser/tests/test_branchmergeproposal.py
index a010eec..3f5e738 100644
--- a/lib/lp/code/browser/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/browser/tests/test_branchmergeproposal.py
@@ -118,7 +118,6 @@ class GitHostingClientMixin:
class TestBranchMergeProposalContextMenu(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_add_comment_enabled_when_not_mergeable(self):
@@ -132,7 +131,6 @@ class TestBranchMergeProposalContextMenu(TestCaseWithFactory):
class TestDecoratedCodeReviewVoteReference(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_commentEnabled(self):
@@ -1573,7 +1571,6 @@ class TestResubmitBrowserGit(GitHostingClientMixin, BrowserTestCase):
class TestBranchMergeProposalView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -2137,7 +2134,6 @@ class TestBranchMergeProposalView(TestCaseWithFactory):
class TestBranchMergeProposalBrowserView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -2610,7 +2606,6 @@ class TestBranchMergeProposalChangeStatusView(TestCaseWithFactory):
class TestCodeReviewCommentVisibility(
WithScenarios, BrowserTestCase, TestMessageVisibilityMixin
):
-
layer = DatabaseFunctionalLayer
scenarios = [
@@ -2639,7 +2634,6 @@ class TestCodeReviewCommentVisibility(
class TestCodeReviewCommentHideControls(
WithScenarios, BrowserTestCase, TestHideMessageControlMixin
):
-
layer = DatabaseFunctionalLayer
scenarios = [
@@ -2753,7 +2747,6 @@ class TestBranchMergeCandidateView(TestCaseWithFactory):
class TestBranchMergeProposal(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def test_conversation(self):
@@ -2928,7 +2921,6 @@ class TestBranchMergeProposal(BrowserTestCase):
class TestBranchMergeProposalRescanView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def test_rescan_with_git(self):
@@ -3068,7 +3060,6 @@ class TestLatestProposalsForEachBranchGit(
class TestBranchMergeProposalLinkBugViewMixin:
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/browser/tests/test_branchmergeproposallisting.py b/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
index 9e50d59..6fcc7a2 100644
--- a/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
+++ b/lib/lp/code/browser/tests/test_branchmergeproposallisting.py
@@ -321,7 +321,6 @@ class TestProposalVoteSummaryGit(
class TestMergesOnce(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_productseries_bzr(self):
@@ -346,7 +345,6 @@ class TestMergesOnce(BrowserTestCase):
class BranchMergeProposalListingTestMixin:
-
layer = DatabaseFunctionalLayer
supports_privacy = True
@@ -459,7 +457,6 @@ class BranchMergeProposalListingTestMixin:
class MergesTestMixin(BranchMergeProposalListingTestMixin):
-
view_name = "+merges"
page_title = "Merge proposals"
@@ -472,7 +469,6 @@ class MergesTestMixin(BranchMergeProposalListingTestMixin):
class DependentMergesTestMixin(BranchMergeProposalListingTestMixin):
-
view_name = "+dependent-merges"
page_title = "Dependent merge proposals"
@@ -536,7 +532,6 @@ class DependentMergesTestMixin(BranchMergeProposalListingTestMixin):
class ActiveReviewsTestMixin(BranchMergeProposalListingTestMixin):
-
view_name = "+activereviews"
page_title = "Active reviews"
@@ -549,7 +544,6 @@ class ActiveReviewsTestMixin(BranchMergeProposalListingTestMixin):
class ProductContextMixin:
-
label_describes_context = False
def setUp(self):
@@ -562,7 +556,6 @@ class ProductContextMixin:
class ProjectGroupContextMixin:
-
label_describes_context = False
def setUp(self):
@@ -576,7 +569,6 @@ class ProjectGroupContextMixin:
class DistributionSourcePackageContextMixin:
-
# Distribution branches don't have access_policy set.
supports_privacy = False
label_describes_context = False
@@ -604,7 +596,6 @@ class DistributionSourcePackageContextMixin:
class SourcePackageContextMixin:
-
# Distribution branches don't have access_policy set.
supports_privacy = False
supports_git = False
@@ -617,7 +608,6 @@ class SourcePackageContextMixin:
class PersonContextMixin:
-
label_describes_context = False
def setUp(self):
@@ -629,7 +619,6 @@ class PersonContextMixin:
class PersonProductContextMixin:
-
label_describes_context = False
def setUp(self):
@@ -643,7 +632,6 @@ class PersonProductContextMixin:
class BranchContextMixin:
-
supports_git = False
def setUp(self):
@@ -657,7 +645,6 @@ class BranchContextMixin:
class GitRefContextMixin:
-
supports_bzr = False
def setUp(self):
@@ -671,78 +658,66 @@ class GitRefContextMixin:
class TestProductMerges(ProductContextMixin, MergesTestMixin, BrowserTestCase):
-
pass
class TestProjectGroupMerges(
ProjectGroupContextMixin, MergesTestMixin, BrowserTestCase
):
-
pass
class TestDistributionSourcePackageMerges(
DistributionSourcePackageContextMixin, MergesTestMixin, BrowserTestCase
):
-
pass
class TestSourcePackageMerges(
SourcePackageContextMixin, MergesTestMixin, BrowserTestCase
):
-
pass
class TestPersonMerges(PersonContextMixin, MergesTestMixin, BrowserTestCase):
-
pass
class TestPersonProductMerges(
PersonProductContextMixin, MergesTestMixin, BrowserTestCase
):
-
pass
class TestBranchMerges(BranchContextMixin, MergesTestMixin, BrowserTestCase):
-
pass
class TestGitRefMerges(GitRefContextMixin, MergesTestMixin, BrowserTestCase):
-
pass
class TestBranchDependentMerges(
BranchContextMixin, DependentMergesTestMixin, BrowserTestCase
):
-
pass
class TestGitRefDependentMerges(
GitRefContextMixin, DependentMergesTestMixin, BrowserTestCase
):
-
pass
class TestProductActiveReviews(
ProductContextMixin, ActiveReviewsTestMixin, BrowserTestCase
):
-
pass
class TestProjectGroupActiveReviews(
ProjectGroupContextMixin, ActiveReviewsTestMixin, BrowserTestCase
):
-
pass
@@ -751,42 +726,36 @@ class TestDistributionSourcePackageActiveReviews(
ActiveReviewsTestMixin,
BrowserTestCase,
):
-
pass
class TestSourcePackageActiveReviews(
SourcePackageContextMixin, ActiveReviewsTestMixin, BrowserTestCase
):
-
pass
class TestPersonActiveReviews(
PersonContextMixin, ActiveReviewsTestMixin, BrowserTestCase
):
-
pass
class TestPersonProductActiveReviews(
PersonProductContextMixin, ActiveReviewsTestMixin, BrowserTestCase
):
-
pass
class TestBranchActiveReviews(
BranchContextMixin, ActiveReviewsTestMixin, BrowserTestCase
):
-
pass
class TestGitRefActiveReviews(
GitRefContextMixin, ActiveReviewsTestMixin, BrowserTestCase
):
-
pass
diff --git a/lib/lp/code/browser/tests/test_branchsubscription.py b/lib/lp/code/browser/tests/test_branchsubscription.py
index e975838..30ed183 100644
--- a/lib/lp/code/browser/tests/test_branchsubscription.py
+++ b/lib/lp/code/browser/tests/test_branchsubscription.py
@@ -10,7 +10,6 @@ from lp.testing.views import create_initialized_view
class TestBranchSubscriptionAddOtherView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_cannot_subscribe_open_team_to_private_branch(self):
diff --git a/lib/lp/code/browser/tests/test_cibuild.py b/lib/lp/code/browser/tests/test_cibuild.py
index 3c5d7bf..7bf5355 100644
--- a/lib/lp/code/browser/tests/test_cibuild.py
+++ b/lib/lp/code/browser/tests/test_cibuild.py
@@ -34,7 +34,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrlForCIBuild(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_canonical_url(self):
@@ -48,7 +47,6 @@ class TestCanonicalUrlForCIBuild(TestCaseWithFactory):
class TestCIBuildOperations(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -229,7 +227,6 @@ class TestCIBuildOperations(BrowserTestCase):
class TestCIBuildView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_files(self):
diff --git a/lib/lp/code/browser/tests/test_codeimport.py b/lib/lp/code/browser/tests/test_codeimport.py
index aa6f366..4ec6550 100644
--- a/lib/lp/code/browser/tests/test_codeimport.py
+++ b/lib/lp/code/browser/tests/test_codeimport.py
@@ -25,7 +25,6 @@ from lp.testing.views import create_initialized_view
class TestImportDetails(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertImportDetailsDisplayed(
diff --git a/lib/lp/code/browser/tests/test_codereviewcomment.py b/lib/lp/code/browser/tests/test_codereviewcomment.py
index 535454f..212cfe8 100644
--- a/lib/lp/code/browser/tests/test_codereviewcomment.py
+++ b/lib/lp/code/browser/tests/test_codereviewcomment.py
@@ -32,7 +32,6 @@ from lp.testing.matchers import HasQueryCount
class TestCodeReviewComments(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_display_comment_provides_icodereviewdisplaycomment(self):
@@ -138,7 +137,6 @@ class TestCodeReviewCommentInlineComments(TestCaseWithFactory):
class TestCodeReviewCommentHtmlMixin:
-
layer = DatabaseFunctionalLayer
def test_comment_page_has_meta_description(self):
diff --git a/lib/lp/code/browser/tests/test_diff.py b/lib/lp/code/browser/tests/test_diff.py
index 18acc9d..807348d 100644
--- a/lib/lp/code/browser/tests/test_diff.py
+++ b/lib/lp/code/browser/tests/test_diff.py
@@ -9,7 +9,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestFormatterAPI(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_empty_conflicts(self):
diff --git a/lib/lp/code/browser/tests/test_gitlisting.py b/lib/lp/code/browser/tests/test_gitlisting.py
index 0a2ec42..1fc40a7 100644
--- a/lib/lp/code/browser/tests/test_gitlisting.py
+++ b/lib/lp/code/browser/tests/test_gitlisting.py
@@ -28,7 +28,6 @@ from lp.testing.views import create_initialized_view
class TestTargetGitListingView:
-
layer = DatabaseFunctionalLayer
def setDefaultRepository(self, target, repository):
@@ -234,7 +233,6 @@ class TestTargetGitListingView:
class TestPersonTargetGitListingView:
-
layer = DatabaseFunctionalLayer
def test_rendering(self):
@@ -554,7 +552,6 @@ class TestPersonOCIProjectGitListingView(
class TestPlainGitListingView:
-
layer = DatabaseFunctionalLayer
def test_rendering(self):
diff --git a/lib/lp/code/browser/tests/test_gitref.py b/lib/lp/code/browser/tests/test_gitref.py
index 073af5e..0c02bac 100644
--- a/lib/lp/code/browser/tests/test_gitref.py
+++ b/lib/lp/code/browser/tests/test_gitref.py
@@ -46,7 +46,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestGitRefNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_canonical_url_branch(self):
@@ -95,7 +94,6 @@ class MissingCommitsNote(soupmatchers.Tag):
class TestGitRefView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/browser/tests/test_gitrepository.py b/lib/lp/code/browser/tests/test_gitrepository.py
index 8ab604b..d9878a4 100644
--- a/lib/lp/code/browser/tests/test_gitrepository.py
+++ b/lib/lp/code/browser/tests/test_gitrepository.py
@@ -92,7 +92,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestGitRepositoryNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeRevisionStatusArtifact(self, report, artifact_type=None):
@@ -133,7 +132,6 @@ class TestGitRepositoryNavigation(TestCaseWithFactory):
class TestGitRepositoryView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -782,7 +780,6 @@ class TestGitRepositoryView(BrowserTestCase):
class TestGitRepositoryRescanView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_owner_can_see_rescan(self):
@@ -1012,7 +1009,6 @@ class TestGitRepositoryBranches(BrowserTestCase):
class TestGitRepositoryEditReviewerView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_initial_reviewer_not_set(self):
@@ -1072,7 +1068,6 @@ class TestGitRepositoryEditReviewerView(TestCaseWithFactory):
class TestGitRepositoryEditBuilderConstraintsView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_unauthorized(self):
@@ -1122,7 +1117,6 @@ class TestGitRepositoryEditBuilderConstraintsView(BrowserTestCase):
class TestGitRepositoryEditView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_repository_target_widget_read_only(self):
@@ -1624,7 +1618,6 @@ class TestGitRepositoryEditViewInformationTypes(TestCaseWithFactory):
class TestGitRepositoryDiffView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_render(self):
@@ -1701,7 +1694,6 @@ class TestGitRepositoryDiffView(BrowserTestCase):
class TestGitRepositoryPermissionsView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_rules_properties(self):
@@ -2610,7 +2602,6 @@ class TestGitRepositoryPermissionsView(BrowserTestCase):
class TestGitRepositoryDeletionView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_repository_has_delete_link(self):
@@ -2698,7 +2689,6 @@ class TestGitRepositoryDeletionView(BrowserTestCase):
class TestGitRepositoryActivityView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_render(self):
@@ -2782,7 +2772,6 @@ class TestGitRepositoryActivityView(BrowserTestCase):
class TestGitRepositoryForkView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/browser/tests/test_gitsubscription.py b/lib/lp/code/browser/tests/test_gitsubscription.py
index d7b913f..c1938dc 100644
--- a/lib/lp/code/browser/tests/test_gitsubscription.py
+++ b/lib/lp/code/browser/tests/test_gitsubscription.py
@@ -23,7 +23,6 @@ from lp.testing.views import create_initialized_view
class TestGitSubscriptionAddOtherView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_cannot_subscribe_open_team_to_private_repository(self):
@@ -70,7 +69,6 @@ class TestGitSubscriptionAddOtherView(TestCaseWithFactory):
class TestGitSubscriptionAddView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_requires_login(self):
diff --git a/lib/lp/code/browser/tests/test_product.py b/lib/lp/code/browser/tests/test_product.py
index 013c0a7..157f148 100644
--- a/lib/lp/code/browser/tests/test_product.py
+++ b/lib/lp/code/browser/tests/test_product.py
@@ -430,7 +430,6 @@ class TestProductBranchesViewPortlets(ProductTestBase, BrowserTestCase):
class TestCanConfigureBranches(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_cannot_configure_branches_product_no_edit_permission(self):
@@ -446,7 +445,6 @@ class TestCanConfigureBranches(TestCaseWithFactory):
class TestProductOverviewLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self, user=ANONYMOUS):
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipe.py b/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
index fe6c2a5..5cfc74f 100644
--- a/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
+++ b/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
@@ -71,7 +71,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrlForRecipe(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_canonical_url(self):
@@ -286,7 +285,6 @@ class TestCaseForRecipe(BrowserTestCase):
class TestSourcePackageRecipeAddViewInitialValuesMixin:
-
layer = DatabaseFunctionalLayer
def test_initial_name_exists(self):
@@ -405,7 +403,6 @@ class TestSourcePackageRecipeAddViewInitialValuesGit(
class TestSourcePackageRecipeAddViewMixin:
-
layer = DatabaseFunctionalLayer
def test_create_new_recipe_not_logged_in(self):
@@ -928,7 +925,6 @@ class TestSourcePackageRecipeAddViewBzr(
class TestSourcePackageRecipeAddViewGit(
TestSourcePackageRecipeAddViewMixin, GitMixin, TestCaseForRecipe
):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -1362,7 +1358,6 @@ class TestSourcePackageRecipeEditViewGit(
class TestSourcePackageRecipeViewMixin:
-
layer = LaunchpadFunctionalLayer
def makeSuccessfulBuild(self, archive=None):
@@ -2187,7 +2182,6 @@ class TestSourcePackageRecipeBuildViewGit(
class TestSourcePackageRecipeDeleteViewMixin:
-
layer = DatabaseFunctionalLayer
def test_delete_recipe(self):
@@ -2307,7 +2301,6 @@ class TestBrokenExistingRecipesMixin:
class TestBrokenExistingRecipesBzr(
TestBrokenExistingRecipesMixin, BzrMixin, BrowserTestCase
):
-
RECIPE_FIRST_LINE = (
"# bzr-builder format 0.2 deb-version {debupstream}+{revno}"
)
@@ -2316,7 +2309,6 @@ class TestBrokenExistingRecipesBzr(
class TestBrokenExistingRecipesGit(
TestBrokenExistingRecipesMixin, GitMixin, BrowserTestCase
):
-
RECIPE_FIRST_LINE = (
"# git-build-recipe format 0.4 deb-version {debupstream}+{revtime}"
)
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
index e0c2931..fc52dfa 100644
--- a/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
+++ b/lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
@@ -34,7 +34,6 @@ from lp.testing.sampledata import ADMIN_EMAIL
class TestCanonicalUrlForRecipeBuild(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_canonical_url(self):
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py b/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py
index 67cd465..2571fcd 100644
--- a/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py
+++ b/lib/lp/code/browser/tests/test_sourcepackagerecipelisting.py
@@ -9,7 +9,6 @@ from lp.testing.matchers import HasQueryCount
class TestSourcePackageRecipeListing(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_project_branch_recipe_listing(self):
diff --git a/lib/lp/code/browser/widgets/gitgrantee.py b/lib/lp/code/browser/widgets/gitgrantee.py
index ee3a52e..bafee50 100644
--- a/lib/lp/code/browser/widgets/gitgrantee.py
+++ b/lib/lp/code/browser/widgets/gitgrantee.py
@@ -90,7 +90,6 @@ class GitGranteePersonDisplayWidget(BrowserWidget):
@implementer(IMultiLineWidgetLayout)
class GitGranteeWidgetBase(BrowserWidget):
-
template = ViewPageTemplateFile("templates/gitgrantee.pt")
default_option = "person"
_widgets_set_up = False
diff --git a/lib/lp/code/browser/widgets/gitref.py b/lib/lp/code/browser/widgets/gitref.py
index d75ca78..3cd4478 100644
--- a/lib/lp/code/browser/widgets/gitref.py
+++ b/lib/lp/code/browser/widgets/gitref.py
@@ -90,7 +90,6 @@ class GitRepositoryPickerWidget(VocabularyPickerWidget):
@implementer(IMultiLineWidgetLayout, IAlwaysSubmittedWidget, IInputWidget)
class GitRefWidget(BrowserWidget, InputWidget):
-
template = ViewPageTemplateFile("templates/gitref.pt")
_widgets_set_up = False
@@ -249,7 +248,6 @@ class GitRefWidget(BrowserWidget, InputWidget):
class GitRefPickerWidget(VocabularyPickerWidget):
-
__call__ = ViewPageTemplateFile("templates/gitref-picker.pt")
@property
diff --git a/lib/lp/code/browser/widgets/gitrepositorytarget.py b/lib/lp/code/browser/widgets/gitrepositorytarget.py
index b4f58de..b2369c4 100644
--- a/lib/lp/code/browser/widgets/gitrepositorytarget.py
+++ b/lib/lp/code/browser/widgets/gitrepositorytarget.py
@@ -45,7 +45,6 @@ from lp.services.webapp.interfaces import (
@implementer(IMultiLineWidgetLayout)
class GitRepositoryTargetWidgetBase(BrowserWidget):
-
template = ViewPageTemplateFile("templates/gitrepository-target.pt")
default_option = "project"
_widgets_set_up = False
diff --git a/lib/lp/code/browser/widgets/tests/test_gitgrantee.py b/lib/lp/code/browser/widgets/tests/test_gitgrantee.py
index 452bfa5..ceccf6d 100644
--- a/lib/lp/code/browser/widgets/tests/test_gitgrantee.py
+++ b/lib/lp/code/browser/widgets/tests/test_gitgrantee.py
@@ -27,7 +27,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestGitGranteeWidgetBase:
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py b/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py
index 8d4ba4e..1cf4478 100644
--- a/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py
+++ b/lib/lp/code/browser/widgets/tests/test_gitrefwidget.py
@@ -33,7 +33,6 @@ class Thing:
class TestGitRefWidget(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
scenarios = [
diff --git a/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py b/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py
index 49754be..6eb0506 100644
--- a/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py
+++ b/lib/lp/code/browser/widgets/tests/test_gitrepositorytargetwidget.py
@@ -45,7 +45,6 @@ class Thing:
class TestGitRepositoryTargetWidgetBase:
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/feed/branch.py b/lib/lp/code/feed/branch.py
index 5809f3e..f4fbdfb 100644
--- a/lib/lp/code/feed/branch.py
+++ b/lib/lp/code/feed/branch.py
@@ -368,7 +368,6 @@ class RevisionPerson:
"""
def __init__(self, person, rootsite):
-
no_email = person.name_without_email
if no_email:
self.name = no_email
diff --git a/lib/lp/code/interfaces/branch.py b/lib/lp/code/interfaces/branch.py
index 69cc976..0bf790f 100644
--- a/lib/lp/code/interfaces/branch.py
+++ b/lib/lp/code/interfaces/branch.py
@@ -107,7 +107,6 @@ def get_blacklisted_hostnames():
class BranchURIField(URIField):
-
# XXX leonardr 2009-02-12 [bug=328588]:
# This code should be removed once the underlying database restriction
# is removed.
diff --git a/lib/lp/code/interfaces/branchmergeproposal.py b/lib/lp/code/interfaces/branchmergeproposal.py
index 1da9194..20b4ceb 100644
--- a/lib/lp/code/interfaces/branchmergeproposal.py
+++ b/lib/lp/code/interfaces/branchmergeproposal.py
@@ -87,7 +87,6 @@ BRANCH_MERGE_PROPOSAL_OBSOLETE_STATES = (
class IBranchMergeProposalPublic(IPrivacy):
-
id = Int(
title=_("DB ID"),
required=True,
@@ -277,7 +276,6 @@ class IBranchMergeProposalPublic(IPrivacy):
class IBranchMergeProposalView(Interface):
-
registrant = exported(
PublicPersonChoice(
title=_("Person"),
diff --git a/lib/lp/code/interfaces/codereviewinlinecomment.py b/lib/lp/code/interfaces/codereviewinlinecomment.py
index 903546d..2a4ff1f 100644
--- a/lib/lp/code/interfaces/codereviewinlinecomment.py
+++ b/lib/lp/code/interfaces/codereviewinlinecomment.py
@@ -19,7 +19,6 @@ from lp.registry.interfaces.person import IPerson
class ICodeReviewInlineComment(Interface):
-
previewdiff_id = Attribute(_("The preview diff ID"))
previewdiff = Reference(
title=_("The preview diff"),
diff --git a/lib/lp/code/mail/cibuild.py b/lib/lp/code/mail/cibuild.py
index 696dbd6..2445097 100644
--- a/lib/lp/code/mail/cibuild.py
+++ b/lib/lp/code/mail/cibuild.py
@@ -25,7 +25,6 @@ class CIBuildRecipientReason(RecipientReason):
class CIBuildMailer(BaseMailer):
-
app = "code"
@classmethod
diff --git a/lib/lp/code/mail/sourcepackagerecipebuild.py b/lib/lp/code/mail/sourcepackagerecipebuild.py
index eadcf58..db237e5 100644
--- a/lib/lp/code/mail/sourcepackagerecipebuild.py
+++ b/lib/lp/code/mail/sourcepackagerecipebuild.py
@@ -13,7 +13,6 @@ from lp.services.webapp import canonical_url
class SourcePackageRecipeBuildMailer(BaseMailer):
-
app = "code"
@classmethod
diff --git a/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py
index b50edcc..42ba7a2 100644
--- a/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py
+++ b/lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py
@@ -39,7 +39,6 @@ superseded_body = """\
class TestSourcePackageRecipeBuildMailer(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makeStatusEmail(self, build):
diff --git a/lib/lp/code/model/branchtarget.py b/lib/lp/code/model/branchtarget.py
index d31db1c..998c391 100644
--- a/lib/lp/code/model/branchtarget.py
+++ b/lib/lp/code/model/branchtarget.py
@@ -198,7 +198,6 @@ class PackageBranchTarget(_BaseBranchTarget):
@implementer(IBranchTarget)
class PersonBranchTarget(_BaseBranchTarget):
-
name = "+junk"
default_stacked_on_branch = None
default_merge_target = None
diff --git a/lib/lp/code/model/cibuild.py b/lib/lp/code/model/cibuild.py
index e1b7450..48e171a 100644
--- a/lib/lp/code/model/cibuild.py
+++ b/lib/lp/code/model/cibuild.py
@@ -846,7 +846,6 @@ class CIBuildSet(SpecificBuildFarmJobSourceMixin):
@implementer(IMacaroonIssuer)
class CIBuildMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "ci-build"
issuable_via_authserver = True
diff --git a/lib/lp/code/model/codeimportjob.py b/lib/lp/code/model/codeimportjob.py
index 76b8344..a5de3ce 100644
--- a/lib/lp/code/model/codeimportjob.py
+++ b/lib/lp/code/model/codeimportjob.py
@@ -472,7 +472,6 @@ class CodeImportJobWorkflow:
@implementer(IMacaroonIssuer)
class CodeImportJobMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "code-import-job"
@property
diff --git a/lib/lp/code/model/gitrepository.py b/lib/lp/code/model/gitrepository.py
index 0384d58..37c5c08 100644
--- a/lib/lp/code/model/gitrepository.py
+++ b/lib/lp/code/model/gitrepository.py
@@ -507,7 +507,6 @@ class GitRepository(
result_summary=None,
result=None,
):
-
if not getFeatureFlag(REVISION_STATUS_REPORT_ALLOW_CREATE):
raise RevisionStatusReportsFeatureDisabled()
@@ -2458,7 +2457,6 @@ class GitRepositorySet:
@implementer(IMacaroonIssuer)
class GitRepositoryMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "git-repository"
allow_multiple = {"lp.expires"}
diff --git a/lib/lp/code/model/revision.py b/lib/lp/code/model/revision.py
index 4d7f7ab..8b3f793 100644
--- a/lib/lp/code/model/revision.py
+++ b/lib/lp/code/model/revision.py
@@ -193,7 +193,6 @@ class Revision(StormBase):
@implementer(IRevisionAuthor)
class RevisionAuthor(StormBase):
-
__storm_table__ = "RevisionAuthor"
id = Int(primary=True)
diff --git a/lib/lp/code/model/sourcepackagerecipebuild.py b/lib/lp/code/model/sourcepackagerecipebuild.py
index 4f95e4e..c75ed36 100644
--- a/lib/lp/code/model/sourcepackagerecipebuild.py
+++ b/lib/lp/code/model/sourcepackagerecipebuild.py
@@ -56,7 +56,6 @@ from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
class SourcePackageRecipeBuild(
SpecificBuildFarmJobSourceMixin, PackageBuildMixin, StormBase
):
-
__storm_table__ = "SourcePackageRecipeBuild"
job_type = BuildFarmJobType.RECIPEBRANCHBUILD
diff --git a/lib/lp/code/model/tests/test_branch.py b/lib/lp/code/model/tests/test_branch.py
index 13da173..d31581b 100644
--- a/lib/lp/code/model/tests/test_branch.py
+++ b/lib/lp/code/model/tests/test_branch.py
@@ -156,7 +156,6 @@ def create_knit(test_case):
class TestCodeImport(TestCase):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -316,7 +315,6 @@ class TestBranchChanged(TestCaseWithFactory):
class TestBranchJobViaCelery(TestCaseWithFactory):
-
layer = CeleryBzrsyncdJobLayer
def test_branchChanged_via_celery(self):
@@ -353,7 +351,6 @@ class TestBranchJobViaCelery(TestCaseWithFactory):
class TestBranchWriteJobViaCelery(TestCaseWithFactory):
-
layer = CeleryBranchWriteJobLayer
def test_destroySelf_via_celery(self):
@@ -2247,7 +2244,6 @@ class BranchAddLandingTarget(TestCaseWithFactory):
class TestLandingCandidates(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_private_branch(self):
@@ -3456,7 +3452,6 @@ class TestGetMergeProposalsWS(WebServiceTestCase):
class TestGetMergeProposals(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -3516,7 +3511,6 @@ class TestGetMergeProposals(TestCaseWithFactory):
class TestScheduleDiffUpdates(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_scheduleDiffUpdates(self):
@@ -3679,7 +3673,6 @@ class TestGetBzrBranch(TestCaseWithFactory):
class TestBranchGetBlob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_default_rev_unscanned(self):
@@ -3730,7 +3723,6 @@ class TestBranchGetBlob(TestCaseWithFactory):
class TestBranchUnscan(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_unscan(self):
diff --git a/lib/lp/code/model/tests/test_branchcloud.py b/lib/lp/code/model/tests/test_branchcloud.py
index 0bb0745..1427af3 100644
--- a/lib/lp/code/model/tests/test_branchcloud.py
+++ b/lib/lp/code/model/tests/test_branchcloud.py
@@ -20,7 +20,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestBranchCloud(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_branchcollection.py b/lib/lp/code/model/tests/test_branchcollection.py
index da8a351..8c4e7f7 100644
--- a/lib/lp/code/model/tests/test_branchcollection.py
+++ b/lib/lp/code/model/tests/test_branchcollection.py
@@ -86,7 +86,6 @@ class TestBranchCollectionAdaptation(TestCaseWithFactory):
class TestGenericBranchCollection(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -248,7 +247,6 @@ class TestGenericBranchCollection(TestCaseWithFactory):
class TestBranchCollectionFilters(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -706,7 +704,6 @@ class TestBranchCollectionFilters(TestCaseWithFactory):
class TestGenericBranchCollectionVisibleFilter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -862,7 +859,6 @@ class TestGenericBranchCollectionVisibleFilter(TestCaseWithFactory):
class TestExtendedBranchRevisionDetails(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -969,7 +965,6 @@ class TestExtendedBranchRevisionDetails(TestCaseWithFactory):
class TestBranchMergeProposals(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -1505,7 +1500,6 @@ class TestBranchCollectionOwnerCounts(TestCaseWithFactory):
class TestBranchCollectionConvertListingSortToOrderBy(TestCase):
-
DEFAULT_BRANCH_LISTING_SORT = [
Asc(Product.name),
Desc(Branch.lifecycle_status),
diff --git a/lib/lp/code/model/tests/test_branchhosting.py b/lib/lp/code/model/tests/test_branchhosting.py
index ddd719d..05931b2 100644
--- a/lib/lp/code/model/tests/test_branchhosting.py
+++ b/lib/lp/code/model/tests/test_branchhosting.py
@@ -33,7 +33,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestBranchHostingClient(TestCase):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_branchjob.py b/lib/lp/code/model/tests/test_branchjob.py
index 8d54783..da70a91 100644
--- a/lib/lp/code/model/tests/test_branchjob.py
+++ b/lib/lp/code/model/tests/test_branchjob.py
@@ -107,7 +107,6 @@ class TestBranchJob(TestCaseWithFactory):
class TestBranchJobDerived(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_getOopsMailController(self):
@@ -1370,7 +1369,6 @@ class TestRosettaUploadJob(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryBzrsyncdJobLayer
def test_RosettaUploadJob(self):
@@ -1410,7 +1408,6 @@ class TestViaCelery(TestCaseWithFactory):
class TestReclaimBranchSpaceJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def cleanBranchArea(self):
diff --git a/lib/lp/code/model/tests/test_branchlookup.py b/lib/lp/code/model/tests/test_branchlookup.py
index 6cf90c1..97fe77f 100644
--- a/lib/lp/code/model/tests/test_branchlookup.py
+++ b/lib/lp/code/model/tests/test_branchlookup.py
@@ -275,7 +275,6 @@ class TestGetByPath(TestGetByLPPath):
class TestGetByUrl(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeProductBranch(self):
@@ -804,7 +803,6 @@ class TestGetByLPPath(TestCaseWithFactory):
class PerformLookupTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeProductBranch(self):
diff --git a/lib/lp/code/model/tests/test_branchmergeproposal.py b/lib/lp/code/model/tests/test_branchmergeproposal.py
index 2810d3a..2a7007a 100644
--- a/lib/lp/code/model/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/model/tests/test_branchmergeproposal.py
@@ -100,7 +100,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, LaunchpadFunctionalLayer
class WithVCSScenarios(WithScenarios):
-
scenarios = [
("bzr", {"git": False}),
("git", {"git": True}),
@@ -700,7 +699,6 @@ class TestMergeProposalGetComment(TestCase):
class TestMergeProposalSetCommentVisibility(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_anonymous(self):
@@ -1190,7 +1188,6 @@ class TestMergeProposalNotification(WithVCSScenarios, TestCaseWithFactory):
class TestMergeProposalWebhooks(WithVCSScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getWebhookTarget(self, branch):
@@ -1746,7 +1743,6 @@ class TestBranchMergeProposalDeletion(TestCaseWithFactory):
class TestBranchMergeProposalBugs(WithVCSScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -2390,7 +2386,6 @@ class TestBranchMergeProposalNominateReviewer(
class TestBranchMergeProposalResubmit(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_resubmit(self):
@@ -2653,7 +2648,6 @@ class TestScheduleDiffUpdates(TestCaseWithFactory):
class TestNextPreviewDiffJob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_returns_none_if_job_not_pending(self):
@@ -2696,7 +2690,6 @@ class TestNextPreviewDiffJob(TestCaseWithFactory):
class TestRevisionEndDate(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_revision_end_date_active(self):
@@ -2720,7 +2713,6 @@ class TestRevisionEndDate(TestCaseWithFactory):
class TestGetRevisionsSinceReviewStart(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertRevisionGroups(self, bmp, expected_groups):
@@ -2792,7 +2784,6 @@ class TestGetRevisionsSinceReviewStart(TestCaseWithFactory):
class TestBranchMergeProposalGetIncrementalDiffs(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_getIncrementalDiffs(self):
@@ -2839,7 +2830,6 @@ class TestBranchMergeProposalGetIncrementalDiffs(TestCaseWithFactory):
class TestGetUnlandedSourceBranchRevisions(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_getUnlandedSourceBranchRevisions(self):
@@ -2860,7 +2850,6 @@ class TestGetUnlandedSourceBranchRevisions(TestCaseWithFactory):
class TestBranchMergeProposalInlineComments(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_branchmergeproposaljobs.py b/lib/lp/code/model/tests/test_branchmergeproposaljobs.py
index 9fd3e50..f8f676a 100644
--- a/lib/lp/code/model/tests/test_branchmergeproposaljobs.py
+++ b/lib/lp/code/model/tests/test_branchmergeproposaljobs.py
@@ -95,7 +95,6 @@ class GitMixin:
class TestBranchMergeProposalJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_providesInterface(self):
@@ -135,7 +134,6 @@ class TestBranchMergeProposalJobDerived(TestCaseWithFactory):
class TestMergeProposalNeedsReviewEmailJobMixin:
-
layer = LaunchpadZopelessLayer
def test_providesInterface(self):
@@ -224,7 +222,6 @@ class TestMergeProposalNeedsReviewEmailJobGit(
class TestUpdatePreviewDiffJob(DiffTestCase):
-
layer = LaunchpadZopelessLayer
def test_implement_interface(self):
@@ -443,7 +440,6 @@ def make_runnable_incremental_diff_job(test_case):
class TestGenerateIncrementalDiffJob(DiffTestCase):
-
layer = LaunchpadZopelessLayer
def test_implement_interface(self):
@@ -493,7 +489,6 @@ class TestGenerateIncrementalDiffJob(DiffTestCase):
class TestBranchMergeProposalJobSource(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -708,7 +703,6 @@ class TestBranchMergeProposalJobSource(TestCaseWithFactory):
class TestCodeReviewCommentEmailJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_implement_interface(self):
@@ -733,7 +727,6 @@ class TestCodeReviewCommentEmailJob(TestCaseWithFactory):
class TestReviewRequestedEmailJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_implement_interface(self):
@@ -767,7 +760,6 @@ class TestReviewRequestedEmailJob(TestCaseWithFactory):
class TestMergeProposalUpdatedEmailJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_class_implements_interface(self):
@@ -796,7 +788,6 @@ class TestMergeProposalUpdatedEmailJob(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_MergeProposalNeedsReviewEmailJob(self):
@@ -857,7 +848,6 @@ class TestViaCelery(TestCaseWithFactory):
class TestViaBzrsyncdCelery(DiffTestCase):
-
layer = CeleryBzrsyncdJobLayer
def test_UpdatePreviewDiffJob(self):
diff --git a/lib/lp/code/model/tests/test_branchnamespace.py b/lib/lp/code/model/tests/test_branchnamespace.py
index ab9ec1c..1e6f3e6 100644
--- a/lib/lp/code/model/tests/test_branchnamespace.py
+++ b/lib/lp/code/model/tests/test_branchnamespace.py
@@ -1421,7 +1421,6 @@ class TestPersonalBranchNamespaceAllowedInformationTypes(TestCaseWithFactory):
class BaseValidateNewBranchMixin:
-
layer = DatabaseFunctionalLayer
def _getNamespace(self, owner):
diff --git a/lib/lp/code/model/tests/test_branchpuller.py b/lib/lp/code/model/tests/test_branchpuller.py
index 40e855a..d2215ba 100644
--- a/lib/lp/code/model/tests/test_branchpuller.py
+++ b/lib/lp/code/model/tests/test_branchpuller.py
@@ -97,7 +97,6 @@ class TestMirroringForImportedBranches(TestCaseWithFactory):
class TestMirroringForMirroredBranches(TestMirroringForImportedBranches):
-
branch_type = BranchType.MIRRORED
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_branchset.py b/lib/lp/code/model/tests/test_branchset.py
index a6e2cd8..b6fcd5c 100644
--- a/lib/lp/code/model/tests/test_branchset.py
+++ b/lib/lp/code/model/tests/test_branchset.py
@@ -27,7 +27,6 @@ from lp.testing.pages import webservice_for_person
class TestBranchSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_provides_IBranchSet(self):
diff --git a/lib/lp/code/model/tests/test_branchtarget.py b/lib/lp/code/model/tests/test_branchtarget.py
index 4370f92..85647fe 100644
--- a/lib/lp/code/model/tests/test_branchtarget.py
+++ b/lib/lp/code/model/tests/test_branchtarget.py
@@ -63,7 +63,6 @@ class BaseBranchTargetTests:
class TestPackageBranchTarget(TestCaseWithFactory, BaseBranchTargetTests):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -241,7 +240,6 @@ class TestPackageBranchTarget(TestCaseWithFactory, BaseBranchTargetTests):
class TestPersonBranchTarget(TestCaseWithFactory, BaseBranchTargetTests):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -333,7 +331,6 @@ class TestPersonBranchTarget(TestCaseWithFactory, BaseBranchTargetTests):
class TestProductBranchTarget(TestCaseWithFactory, BaseBranchTargetTests):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_cibuild.py b/lib/lp/code/model/tests/test_cibuild.py
index ae95fbd..a1f2360 100644
--- a/lib/lp/code/model/tests/test_cibuild.py
+++ b/lib/lp/code/model/tests/test_cibuild.py
@@ -86,7 +86,6 @@ from lp.xmlrpc.interfaces import IPrivateApplication
class TestGetAllCommitsForPaths(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_no_refs(self):
@@ -119,7 +118,6 @@ class TestGetAllCommitsForPaths(TestCaseWithFactory):
class TestCIBuild(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_implements_interfaces(self):
@@ -689,7 +687,6 @@ class TestCIBuild(TestCaseWithFactory):
class TestCIBuildSet(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_getByBuildFarmJob_works(self):
@@ -1327,7 +1324,6 @@ class TestCIBuildSet(TestCaseWithFactory):
class TestDetermineDASesToBuild(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_returns_expected_DASes(self):
@@ -1471,7 +1467,6 @@ class TestDetermineDASesToBuild(TestCaseWithFactory):
class TestCIBuildWebservice(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_cibuildbehaviour.py b/lib/lp/code/model/tests/test_cibuildbehaviour.py
index 578c38e..727f75a 100644
--- a/lib/lp/code/model/tests/test_cibuildbehaviour.py
+++ b/lib/lp/code/model/tests/test_cibuildbehaviour.py
@@ -77,7 +77,6 @@ from lp.testing.layers import BaseLayer, ZopelessDatabaseLayer
class TestCIBuildBehaviourBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def makeJob(self, **kwargs):
@@ -152,7 +151,6 @@ _unset = object()
class TestAsyncCIBuildBehaviour(StatsMixin, TestCIBuildBehaviourBase):
-
run_tests_with = AsynchronousDeferredRunTestForBrokenTwisted.make_factory(
timeout=30
)
diff --git a/lib/lp/code/model/tests/test_codeimport.py b/lib/lp/code/model/tests/test_codeimport.py
index b38101b..ceede52 100644
--- a/lib/lp/code/model/tests/test_codeimport.py
+++ b/lib/lp/code/model/tests/test_codeimport.py
@@ -56,7 +56,6 @@ from lp.testing.pages import webservice_for_person
class TestCodeImportBase(WithScenarios, TestCaseWithFactory):
-
scenarios = [
(
"Branch",
diff --git a/lib/lp/code/model/tests/test_codeimportjob.py b/lib/lp/code/model/tests/test_codeimportjob.py
index 8cb025c..5fb2596 100644
--- a/lib/lp/code/model/tests/test_codeimportjob.py
+++ b/lib/lp/code/model/tests/test_codeimportjob.py
@@ -79,7 +79,6 @@ def login_for_code_imports():
class TestCodeImportJob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_codeimportresult.py b/lib/lp/code/model/tests/test_codeimportresult.py
index deb7c51..5189093 100644
--- a/lib/lp/code/model/tests/test_codeimportresult.py
+++ b/lib/lp/code/model/tests/test_codeimportresult.py
@@ -13,7 +13,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestCodeImportResult(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_provides_interface(self):
diff --git a/lib/lp/code/model/tests/test_codereviewcomment.py b/lib/lp/code/model/tests/test_codereviewcomment.py
index eee1f51..823e4f5 100644
--- a/lib/lp/code/model/tests/test_codereviewcomment.py
+++ b/lib/lp/code/model/tests/test_codereviewcomment.py
@@ -16,7 +16,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, LaunchpadFunctionalLayer
class TestCodeReviewComment(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_codereviewvote.py b/lib/lp/code/model/tests/test_codereviewvote.py
index 4fd9371..6330bb7 100644
--- a/lib/lp/code/model/tests/test_codereviewvote.py
+++ b/lib/lp/code/model/tests/test_codereviewvote.py
@@ -19,7 +19,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestCodeReviewVote(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_create_vote(self):
diff --git a/lib/lp/code/model/tests/test_diff.py b/lib/lp/code/model/tests/test_diff.py
index afb7d90..1cc9b06 100644
--- a/lib/lp/code/model/tests/test_diff.py
+++ b/lib/lp/code/model/tests/test_diff.py
@@ -170,7 +170,6 @@ class DiffTestCase(TestCaseWithFactory):
class TestDiff(DiffTestCase):
-
layer = LaunchpadFunctionalLayer
def test_providesInterface(self):
@@ -258,7 +257,6 @@ class TestDiff(DiffTestCase):
class TestDiffInScripts(DiffTestCase):
-
layer = LaunchpadZopelessLayer
def test_mergePreviewFromBranches(self):
diff --git a/lib/lp/code/model/tests/test_gitactivity.py b/lib/lp/code/model/tests/test_gitactivity.py
index 32f7b4b..c087e18 100644
--- a/lib/lp/code/model/tests/test_gitactivity.py
+++ b/lib/lp/code/model/tests/test_gitactivity.py
@@ -15,7 +15,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestGitActivity(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_IGitActivity(self):
diff --git a/lib/lp/code/model/tests/test_gitcollection.py b/lib/lp/code/model/tests/test_gitcollection.py
index 7a67a2c..2fa46fc 100644
--- a/lib/lp/code/model/tests/test_gitcollection.py
+++ b/lib/lp/code/model/tests/test_gitcollection.py
@@ -105,7 +105,6 @@ class TestGitCollectionAdaptation(TestCaseWithFactory):
class TestGenericGitCollection(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -197,7 +196,6 @@ class TestGenericGitCollection(TestCaseWithFactory):
class TestGitCollectionFilters(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -514,7 +512,6 @@ class TestGitCollectionFilters(TestCaseWithFactory):
class TestBranchMergeProposals(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -826,7 +823,6 @@ class TestBranchMergeProposalsForReviewer(TestCaseWithFactory):
class TestGenericGitCollectionVisibleFilter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1223,7 +1219,6 @@ class TestGitCollectionOwnerCounts(TestCaseWithFactory):
class TestGitCollectionConvertListingSortToOrderBy(TestCase):
-
DEFAULT_LISTING_SORT = [
Desc(GitRepository.id),
]
diff --git a/lib/lp/code/model/tests/test_githosting.py b/lib/lp/code/model/tests/test_githosting.py
index c93b311..af50950 100644
--- a/lib/lp/code/model/tests/test_githosting.py
+++ b/lib/lp/code/model/tests/test_githosting.py
@@ -74,7 +74,6 @@ class MatchesURL(AfterPreprocessing):
class TestGitHostingClient(TestCase):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_gitnamespace.py b/lib/lp/code/model/tests/test_gitnamespace.py
index df4c5cc..5775b18 100644
--- a/lib/lp/code/model/tests/test_gitnamespace.py
+++ b/lib/lp/code/model/tests/test_gitnamespace.py
@@ -1432,7 +1432,6 @@ class TestOCIProjectGitNamespaceAllowedInformationTypes(TestCaseWithFactory):
class BaseValidateNewRepositoryMixin:
-
layer = DatabaseFunctionalLayer
def _getNamespace(self, owner):
diff --git a/lib/lp/code/model/tests/test_gitref.py b/lib/lp/code/model/tests/test_gitref.py
index acf4821..fefcf02 100644
--- a/lib/lp/code/model/tests/test_gitref.py
+++ b/lib/lp/code/model/tests/test_gitref.py
@@ -59,7 +59,6 @@ from lp.testing.pages import webservice_for_person
class TestGitRef(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_comparison(self):
diff --git a/lib/lp/code/model/tests/test_gitrepository.py b/lib/lp/code/model/tests/test_gitrepository.py
index ecf5663..f74776f 100644
--- a/lib/lp/code/model/tests/test_gitrepository.py
+++ b/lib/lp/code/model/tests/test_gitrepository.py
@@ -205,7 +205,6 @@ from lp.xmlrpc.interfaces import IPrivateApplication
class TestParseGitCommits(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_valid(self):
@@ -3333,7 +3332,6 @@ class TestGitRepositorySetTarget(TestCaseWithFactory):
class TestGitRepositoryRescan(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_rescan(self):
@@ -3405,7 +3403,6 @@ class TestGitRepositoryRescan(TestCaseWithFactory):
class TestGitRepositoryUpdateMergeCommitIDs(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_updates_proposals(self):
@@ -3474,7 +3471,6 @@ class TestGitRepositoryUpdateMergeCommitIDs(TestCaseWithFactory):
class TestGitRepositoryUpdateLandingTargets(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_schedules_diff_updates(self):
@@ -3509,7 +3505,6 @@ class TestGitRepositoryUpdateLandingTargets(TestCaseWithFactory):
class TestGitRepositoryMarkRecipesStale(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_base_repository_recipe(self):
@@ -3624,7 +3619,6 @@ class TestGitRepositoryMarkRecipesStale(TestCaseWithFactory):
class TestGitRepositoryMarkSnapsStale(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_same_repository(self):
@@ -3677,7 +3671,6 @@ class TestGitRepositoryMarkSnapsStale(TestCaseWithFactory):
class TestGitRepositoryMarkCharmRecipesStale(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -3731,7 +3724,6 @@ class TestGitRepositoryMarkCharmRecipesStale(TestCaseWithFactory):
class TestGitRepositoryFork(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -3881,7 +3873,6 @@ class TestGitRepositoryFork(TestCaseWithFactory):
class TestGitRepositoryDetectMerges(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_markProposalMerged(self):
@@ -4008,7 +3999,6 @@ class TestGitRepositoryDetectMerges(TestCaseWithFactory):
class TestGitRepositoryRequestCIBuilds(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_findByGitRepository_created_with_configuration(self):
@@ -4274,7 +4264,6 @@ class TestGitRepositoryGetBlob(TestCaseWithFactory):
class TestGitRepositoryRules(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_rules(self):
@@ -4824,7 +4813,6 @@ class TestGitRepositoryRules(TestCaseWithFactory):
class TestGitRepositorySet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -5277,7 +5265,6 @@ class TestGitRepositorySet(TestCaseWithFactory):
class TestGitRepositorySetDefaultsMixin:
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/model/tests/test_gitrule.py b/lib/lp/code/model/tests/test_gitrule.py
index d2f5ea6..e43e0eb 100644
--- a/lib/lp/code/model/tests/test_gitrule.py
+++ b/lib/lp/code/model/tests/test_gitrule.py
@@ -29,7 +29,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestGitRule(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_IGitRule(self):
@@ -744,7 +743,6 @@ class TestGitRule(TestCaseWithFactory):
class TestGitRuleGrant(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_IGitRuleGrant(self):
diff --git a/lib/lp/code/model/tests/test_hasbranches.py b/lib/lp/code/model/tests/test_hasbranches.py
index eb1ce07..de77dba 100644
--- a/lib/lp/code/model/tests/test_hasbranches.py
+++ b/lib/lp/code/model/tests/test_hasbranches.py
@@ -43,7 +43,6 @@ class TestIHasBranches(TestCaseWithFactory):
class TestHasMergeProposalsWebservice(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_constant_query_count(self):
diff --git a/lib/lp/code/model/tests/test_linkedbranch.py b/lib/lp/code/model/tests/test_linkedbranch.py
index 26cc89a..8f1d066 100644
--- a/lib/lp/code/model/tests/test_linkedbranch.py
+++ b/lib/lp/code/model/tests/test_linkedbranch.py
@@ -18,7 +18,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestProductSeriesLinkedBranch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_branch(self):
@@ -55,7 +54,6 @@ class TestProductSeriesLinkedBranch(TestCaseWithFactory):
class TestProductLinkedBranch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_branch(self):
@@ -88,7 +86,6 @@ class TestProductLinkedBranch(TestCaseWithFactory):
class TestSuiteSourcePackageLinkedBranch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_branch(self):
@@ -135,7 +132,6 @@ class TestSuiteSourcePackageLinkedBranch(TestCaseWithFactory):
class TestDistributionSourcePackageLinkedBranch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_branch(self):
@@ -212,7 +208,6 @@ class TestDistributionSourcePackageLinkedBranch(TestCaseWithFactory):
class TestProjectLinkedBranch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_cannot_have_linked_branch(self):
@@ -224,7 +219,6 @@ class TestProjectLinkedBranch(TestCaseWithFactory):
class TestLinkedBranchSorting(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_sorting_different_types(self):
diff --git a/lib/lp/code/model/tests/test_recipebuilder.py b/lib/lp/code/model/tests/test_recipebuilder.py
index 33481f5..fe44620 100644
--- a/lib/lp/code/model/tests/test_recipebuilder.py
+++ b/lib/lp/code/model/tests/test_recipebuilder.py
@@ -53,7 +53,6 @@ from lp.testing.mail_helpers import pop_notifications
class TestRecipeBuilderBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def makeJob(
@@ -179,7 +178,6 @@ class TestRecipeBuilder(TestRecipeBuilderBase):
class TestAsyncRecipeBuilder(TestRecipeBuilderBase):
-
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
def _setBuilderConfig(self):
@@ -447,7 +445,6 @@ class TestAsyncRecipeBuilder(TestRecipeBuilderBase):
class TestBuildNotifications(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipe.py b/lib/lp/code/model/tests/test_sourcepackagerecipe.py
index 46cf603..63e54ae 100644
--- a/lib/lp/code/model/tests/test_sourcepackagerecipe.py
+++ b/lib/lp/code/model/tests/test_sourcepackagerecipe.py
@@ -977,7 +977,6 @@ class TestSourcePackageRecipeGit(
class TestRecipeBranchRoundTrippingMixin:
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1402,7 +1401,6 @@ class RecipeDateLastModified(TestCaseWithFactory):
class TestWebserviceMixin:
-
layer = AppServerLayer
def makeRecipe(
diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py b/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
index bd2ad6e..d08294d 100644
--- a/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
+++ b/lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
@@ -511,7 +511,6 @@ class TestSourcePackageRecipeBuild(TestCaseWithFactory):
class TestAsBuildmaster(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_notify(self):
diff --git a/lib/lp/code/publisher.py b/lib/lp/code/publisher.py
index a30496c..be981ba 100644
--- a/lib/lp/code/publisher.py
+++ b/lib/lp/code/publisher.py
@@ -27,7 +27,6 @@ from lp.services.webapp.servers import (
@implementer(IFacet)
class BranchesFacet:
-
name = "branches"
rootsite = "code"
text = "Code"
diff --git a/lib/lp/code/scripts/tests/test_merge_proposal_jobs.py b/lib/lp/code/scripts/tests/test_merge_proposal_jobs.py
index f571899..cd56f50 100644
--- a/lib/lp/code/scripts/tests/test_merge_proposal_jobs.py
+++ b/lib/lp/code/scripts/tests/test_merge_proposal_jobs.py
@@ -18,7 +18,6 @@ from lp.testing.layers import ZopelessAppServerLayer
class TestMergeProposalJobScript(DiffTestCase):
-
layer = ZopelessAppServerLayer
def test_script_runs(self):
diff --git a/lib/lp/code/scripts/tests/test_reclaim_branch_space.py b/lib/lp/code/scripts/tests/test_reclaim_branch_space.py
index 9a85f77..06d70ce 100644
--- a/lib/lp/code/scripts/tests/test_reclaim_branch_space.py
+++ b/lib/lp/code/scripts/tests/test_reclaim_branch_space.py
@@ -20,7 +20,6 @@ from lp.testing.layers import ZopelessAppServerLayer
class TestReclaimBranchSpaceScript(TestCaseWithFactory):
-
layer = ZopelessAppServerLayer
@staticmethod
diff --git a/lib/lp/code/scripts/tests/test_repack_git_repositories.py b/lib/lp/code/scripts/tests/test_repack_git_repositories.py
index 4fc4f93..25cff03 100644
--- a/lib/lp/code/scripts/tests/test_repack_git_repositories.py
+++ b/lib/lp/code/scripts/tests/test_repack_git_repositories.py
@@ -61,7 +61,6 @@ class FakeTurnipServer(threading.Thread):
class TestRequestGitRepack(TestCaseWithFactory):
-
layer = ZopelessAppServerLayer
def setUp(self):
diff --git a/lib/lp/code/scripts/tests/test_request_daily_builds.py b/lib/lp/code/scripts/tests/test_request_daily_builds.py
index bf003bc..2bbe383 100644
--- a/lib/lp/code/scripts/tests/test_request_daily_builds.py
+++ b/lib/lp/code/scripts/tests/test_request_daily_builds.py
@@ -180,7 +180,6 @@ class FakeTurnipServer(threading.Thread):
class TestRequestDailyBuilds(TestCaseWithFactory):
-
layer = ZopelessAppServerLayer
def setUp(self):
diff --git a/lib/lp/code/scripts/tests/test_sendbranchmail.py b/lib/lp/code/scripts/tests/test_sendbranchmail.py
index 629f6a2..ff5df34 100644
--- a/lib/lp/code/scripts/tests/test_sendbranchmail.py
+++ b/lib/lp/code/scripts/tests/test_sendbranchmail.py
@@ -18,7 +18,6 @@ from lp.testing.layers import ZopelessAppServerLayer
class TestSendbranchmail(TestCaseWithFactory):
-
layer = ZopelessAppServerLayer
def createBranch(self):
diff --git a/lib/lp/code/scripts/tests/test_upgrade_branches.py b/lib/lp/code/scripts/tests/test_upgrade_branches.py
index a8ec74a..bb5f471 100644
--- a/lib/lp/code/scripts/tests/test_upgrade_branches.py
+++ b/lib/lp/code/scripts/tests/test_upgrade_branches.py
@@ -15,7 +15,6 @@ from lp.testing.layers import ZopelessAppServerLayer
class TestUpgradeBranches(TestCaseWithFactory):
-
layer = ZopelessAppServerLayer
def test_upgrade_branches(self):
diff --git a/lib/lp/code/security.py b/lib/lp/code/security.py
index 87f028a..08d490d 100644
--- a/lib/lp/code/security.py
+++ b/lib/lp/code/security.py
@@ -541,7 +541,6 @@ class BranchMergeProposalEdit(AuthorizationBase):
class ViewSourcePackageRecipe(DelegatedAuthorization):
-
permission = "launchpad.View"
usedfor = ISourcePackageRecipe
@@ -550,7 +549,6 @@ class ViewSourcePackageRecipe(DelegatedAuthorization):
class DeleteSourcePackageRecipe(AuthorizationBase):
-
permission = "launchpad.Delete"
usedfor = ISourcePackageRecipe
@@ -561,7 +559,6 @@ class DeleteSourcePackageRecipe(AuthorizationBase):
class ViewSourcePackageRecipeBuild(DelegatedAuthorization):
-
permission = "launchpad.View"
usedfor = ISourcePackageRecipeBuild
diff --git a/lib/lp/code/tests/test_branch.py b/lib/lp/code/tests/test_branch.py
index 065f8cd..69960f4 100644
--- a/lib/lp/code/tests/test_branch.py
+++ b/lib/lp/code/tests/test_branch.py
@@ -22,7 +22,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class PermissionTest(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertPermission(self, can_access, person, secure_object, permission):
@@ -355,7 +354,6 @@ class TestWriteToBranch(PermissionTest):
class TestComposePublicURL(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/tests/test_branch_webservice.py b/lib/lp/code/tests/test_branch_webservice.py
index 2466942..deeec13 100644
--- a/lib/lp/code/tests/test_branch_webservice.py
+++ b/lib/lp/code/tests/test_branch_webservice.py
@@ -29,7 +29,6 @@ from lp.testing.pages import webservice_for_person
class TestBranch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_landing_candidates_constant_queries(self):
@@ -96,11 +95,9 @@ class TestBranch(TestCaseWithFactory):
class TestBranchOperations(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_createMergeProposal_fails_if_reviewers_and_types_mismatch(self):
-
source = self.factory.makeBranch(name="rock")
source_url = api_url(source)
@@ -193,7 +190,6 @@ class TestBranchOperations(TestCaseWithFactory):
class TestBranchDeletes(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -235,7 +231,6 @@ class TestBranchDeletes(TestCaseWithFactory):
class TestSlashBranches(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_renders_with_source_package_branch(self):
diff --git a/lib/lp/code/tests/test_branchmergeproposal.py b/lib/lp/code/tests/test_branchmergeproposal.py
index 9a70bed..42cddf2 100644
--- a/lib/lp/code/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/tests/test_branchmergeproposal.py
@@ -98,7 +98,6 @@ class TestEditMergeProposal(PermissionTest):
class TestViewMergeProposal(PermissionTest):
-
layer = DatabaseFunctionalLayer
@with_celebrity_logged_in("admin")
diff --git a/lib/lp/code/tests/test_directbranchcommit.py b/lib/lp/code/tests/test_directbranchcommit.py
index df4dd7c..d1b404a 100644
--- a/lib/lp/code/tests/test_directbranchcommit.py
+++ b/lib/lp/code/tests/test_directbranchcommit.py
@@ -329,7 +329,6 @@ class TestGetBzrCommitterID(TestCaseWithFactory):
class TestStaleLastMirroredID(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_raises_StaleLastMirrored(self):
diff --git a/lib/lp/code/tests/test_project.py b/lib/lp/code/tests/test_project.py
index 7230a94..044a101 100644
--- a/lib/lp/code/tests/test_project.py
+++ b/lib/lp/code/tests/test_project.py
@@ -8,7 +8,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestProjectBranches(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/tests/test_yuitests.py b/lib/lp/code/tests/test_yuitests.py
index ccc274b..cf353fc 100644
--- a/lib/lp/code/tests/test_yuitests.py
+++ b/lib/lp/code/tests/test_yuitests.py
@@ -10,7 +10,6 @@ from lp.testing.layers import YUITestLayer
class CodeYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "CodeYUIUnitTests"
diff --git a/lib/lp/code/vocabularies/sourcepackagerecipe.py b/lib/lp/code/vocabularies/sourcepackagerecipe.py
index 8bac4f0..f500190 100644
--- a/lib/lp/code/vocabularies/sourcepackagerecipe.py
+++ b/lib/lp/code/vocabularies/sourcepackagerecipe.py
@@ -27,7 +27,6 @@ from lp.soyuz.vocabularies import make_archive_vocabulary
@implementer(IHugeVocabulary)
class BuildableDistroSeries(SQLObjectVocabularyBase):
-
_table = DistroSeries
def toTerm(self, obj):
diff --git a/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py b/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py
index 0ad6d9c..afbdbdf 100644
--- a/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py
+++ b/lib/lp/code/vocabularies/tests/test_gitref_vocabularies.py
@@ -16,7 +16,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestGitRefVocabulary(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
vocabulary_class = GitRefVocabulary
@@ -168,7 +167,6 @@ class TestGitRefVocabulary(TestCaseWithFactory):
class TestGitBranchVocabulary(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
vocabulary_class = GitBranchVocabulary
diff --git a/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py b/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py
index 92e45cb..055e35c 100644
--- a/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py
+++ b/lib/lp/code/vocabularies/tests/test_gitrule_vocabularies.py
@@ -10,7 +10,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestGitPermissionsVocabulary(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
expected_branch_values = [
diff --git a/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py b/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py
index d332f35..11d471f 100644
--- a/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py
+++ b/lib/lp/code/xmlrpc/tests/test_codeimportscheduler.py
@@ -23,7 +23,6 @@ from lp.xmlrpc.faults import NoSuchCodeImportJob
class TestCodeImportSchedulerAPI(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/code/xmlrpc/tests/test_git.py b/lib/lp/code/xmlrpc/tests/test_git.py
index dab3c43..35f25da 100644
--- a/lib/lp/code/xmlrpc/tests/test_git.py
+++ b/lib/lp/code/xmlrpc/tests/test_git.py
@@ -104,7 +104,6 @@ def _make_auth_params(
@implementer(IMacaroonIssuer)
class FakeMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "test"
_root_secret = "test"
_verified_user = NO_USER
diff --git a/lib/lp/codehosting/puller/tests/test_scheduler.py b/lib/lp/codehosting/puller/tests/test_scheduler.py
index b3eb82e..b6ad5de 100644
--- a/lib/lp/codehosting/puller/tests/test_scheduler.py
+++ b/lib/lp/codehosting/puller/tests/test_scheduler.py
@@ -436,7 +436,6 @@ class TestPullerMonitorProtocol(ProcessTestsMixin, TestCase):
class TestPullerMaster(TestCase):
-
run_tests_with = AsynchronousDeferredRunTest
def setUp(self):
@@ -553,7 +552,6 @@ class TestPullerMaster(TestCase):
class TestPullerMasterSpawning(TestCase):
-
run_tests_with = AsynchronousDeferredRunTest
def setUp(self):
diff --git a/lib/lp/codehosting/scanner/bzrsync.py b/lib/lp/codehosting/scanner/bzrsync.py
index db9c67b..4d55348 100644
--- a/lib/lp/codehosting/scanner/bzrsync.py
+++ b/lib/lp/codehosting/scanner/bzrsync.py
@@ -292,7 +292,7 @@ class BzrSync:
ancestry of the branch. May overlap with added_history.
"""
start_revno = last_revno - len(added_history) + 1
- for (revno, revision_id) in enumerate(added_history, start_revno):
+ for revno, revision_id in enumerate(added_history, start_revno):
yield revision_id, revno
for revision_id in added_ancestry.difference(added_history):
yield revision_id, None
diff --git a/lib/lp/codehosting/scanner/tests/test_buglinks.py b/lib/lp/codehosting/scanner/tests/test_buglinks.py
index 982e3a7..b93016e 100644
--- a/lib/lp/codehosting/scanner/tests/test_buglinks.py
+++ b/lib/lp/codehosting/scanner/tests/test_buglinks.py
@@ -252,7 +252,6 @@ class TestBugLinking(BzrSyncTestCase):
class TestSubscription(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_got_new_revision_subscribed(self):
diff --git a/lib/lp/codehosting/scanner/tests/test_email.py b/lib/lp/codehosting/scanner/tests/test_email.py
index 0291fc6..db2d1e0 100644
--- a/lib/lp/codehosting/scanner/tests/test_email.py
+++ b/lib/lp/codehosting/scanner/tests/test_email.py
@@ -153,7 +153,6 @@ class TestBzrSyncEmail(BzrSyncTestCase):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def prepare(self, job_name):
@@ -208,7 +207,6 @@ class TestViaCelery(TestCaseWithFactory):
class TestScanBranches(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_queue_tip_changed_email_jobs_subscribed(self):
diff --git a/lib/lp/codehosting/scripts/tests/test_sync_branches.py b/lib/lp/codehosting/scripts/tests/test_sync_branches.py
index a6dcc4b..1d38c4a 100644
--- a/lib/lp/codehosting/scripts/tests/test_sync_branches.py
+++ b/lib/lp/codehosting/scripts/tests/test_sync_branches.py
@@ -58,7 +58,6 @@ class BranchSyncProcessMatches(MatchesListwise):
class TestSyncBranches(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py b/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py
index 87752a6..3a822e1 100644
--- a/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py
+++ b/lib/lp/codehosting/scripts/tests/test_upgrade_all_branches.py
@@ -17,7 +17,6 @@ from lp.testing.layers import AppServerLayer
class TestUpgradeAllBranchesScript(TestCaseWithFactory):
-
layer = AppServerLayer
def setUp(self):
diff --git a/lib/lp/codehosting/sshserver/session.py b/lib/lp/codehosting/sshserver/session.py
index 7c8672d..d64a60f 100644
--- a/lib/lp/codehosting/sshserver/session.py
+++ b/lib/lp/codehosting/sshserver/session.py
@@ -22,12 +22,10 @@ from lp.services.config import config
class BazaarSSHStarted(AvatarEvent):
-
template = "[%(session_id)s] %(username)s started bzr+ssh session."
class BazaarSSHClosed(AvatarEvent):
-
template = "[%(session_id)s] %(username)s closed bzr+ssh session."
diff --git a/lib/lp/codehosting/tests/test_acceptance.py b/lib/lp/codehosting/tests/test_acceptance.py
index 52a87f5..ecf597a 100644
--- a/lib/lp/codehosting/tests/test_acceptance.py
+++ b/lib/lp/codehosting/tests/test_acceptance.py
@@ -41,7 +41,6 @@ from lp.testing.layers import ZopelessAppServerLayer
class SSHServerLayer(ZopelessAppServerLayer):
-
_tac_handler = None
@classmethod
diff --git a/lib/lp/codehosting/tests/test_rewrite.py b/lib/lp/codehosting/tests/test_rewrite.py
index 9ba726d..28f78b3 100644
--- a/lib/lp/codehosting/tests/test_rewrite.py
+++ b/lib/lp/codehosting/tests/test_rewrite.py
@@ -29,7 +29,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, DatabaseLayer
class TestBranchRewriter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/codehosting/tests/test_sftp.py b/lib/lp/codehosting/tests/test_sftp.py
index 21d8247..fb18aa6 100644
--- a/lib/lp/codehosting/tests/test_sftp.py
+++ b/lib/lp/codehosting/tests/test_sftp.py
@@ -101,7 +101,6 @@ class TestFatLocalTransport(TestCaseInTempDir):
class TestSFTPAdapter(TestCase):
-
run_tests_with = AsynchronousDeferredRunTest
def setUp(self):
diff --git a/lib/lp/codehosting/tests/test_upgrade.py b/lib/lp/codehosting/tests/test_upgrade.py
index f8a2729..6308aa5 100644
--- a/lib/lp/codehosting/tests/test_upgrade.py
+++ b/lib/lp/codehosting/tests/test_upgrade.py
@@ -31,7 +31,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestUpgrader(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def prepare(self, format="pack-0.92", loomify_branch=False):
diff --git a/lib/lp/codehosting/vfs/tests/test_branchfs.py b/lib/lp/codehosting/vfs/tests/test_branchfs.py
index bc9b414..c3185c0 100644
--- a/lib/lp/codehosting/vfs/tests/test_branchfs.py
+++ b/lib/lp/codehosting/vfs/tests/test_branchfs.py
@@ -246,7 +246,6 @@ class MixinBaseLaunchpadServerTests:
class TestLaunchpadServer(MixinBaseLaunchpadServerTests, BzrTestCase):
-
run_tests_with = AsynchronousDeferredRunTest
def setUp(self):
@@ -876,7 +875,6 @@ class LaunchpadTransportTests:
class TestLaunchpadTransportSync(LaunchpadTransportTests, TestCase):
-
run_tests_with = AsynchronousDeferredRunTest
def _ensureDeferred(self, function, *args, **kwargs):
@@ -904,7 +902,6 @@ class TestLaunchpadTransportSync(LaunchpadTransportTests, TestCase):
class TestLaunchpadTransportAsync(LaunchpadTransportTests, TestCase):
-
run_tests_with = AsynchronousDeferredRunTest
def _ensureDeferred(self, function, *args, **kwargs):
diff --git a/lib/lp/coop/answersbugs/tests/test_questionbug.py b/lib/lp/coop/answersbugs/tests/test_questionbug.py
index a379dda..17f489f 100644
--- a/lib/lp/coop/answersbugs/tests/test_questionbug.py
+++ b/lib/lp/coop/answersbugs/tests/test_questionbug.py
@@ -6,7 +6,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestQuestionBugLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_link_and_unlink(self):
diff --git a/lib/lp/coop/answersbugs/visibility.py b/lib/lp/coop/answersbugs/visibility.py
index be29ef6..671a548 100644
--- a/lib/lp/coop/answersbugs/visibility.py
+++ b/lib/lp/coop/answersbugs/visibility.py
@@ -13,7 +13,6 @@ from lp.testing.pages import find_tag_by_id
class TestMessageVisibilityMixin:
-
comment_text = "You can't see me."
html_comment_text = html_escape(comment_text)
@@ -63,7 +62,6 @@ class TestMessageVisibilityMixin:
class TestHideMessageControlMixin:
-
control_text = "mark-spam-1"
def getContext(self, comment_owner=None):
diff --git a/lib/lp/oci/browser/ocirecipe.py b/lib/lp/oci/browser/ocirecipe.py
index 7fe9c3d..6b04623 100644
--- a/lib/lp/oci/browser/ocirecipe.py
+++ b/lib/lp/oci/browser/ocirecipe.py
@@ -100,7 +100,6 @@ from lp.soyuz.interfaces.binarypackagebuild import BuildSetStatus
class OCIRecipeNavigation(WebhookTargetNavigationMixin, Navigation):
-
usedfor = IOCIRecipe
@stepthrough("+build-request")
@@ -1136,7 +1135,6 @@ class OCIRecipeAddView(
class BaseOCIRecipeEditView(LaunchpadEditFormView):
-
schema = IOCIRecipeEditSchema
next_url = None
diff --git a/lib/lp/oci/browser/ocirecipebuild.py b/lib/lp/oci/browser/ocirecipebuild.py
index 7aaad43..00fd94e 100644
--- a/lib/lp/oci/browser/ocirecipebuild.py
+++ b/lib/lp/oci/browser/ocirecipebuild.py
@@ -34,7 +34,6 @@ from lp.soyuz.interfaces.binarypackagebuild import IBuildRescoreForm
class OCIRecipeBuildNavigation(Navigation, FileNavigationMixin):
-
usedfor = IOCIRecipeBuild
diff --git a/lib/lp/oci/browser/ocirecipesubscription.py b/lib/lp/oci/browser/ocirecipesubscription.py
index 65643ba..2196d69 100644
--- a/lib/lp/oci/browser/ocirecipesubscription.py
+++ b/lib/lp/oci/browser/ocirecipesubscription.py
@@ -125,7 +125,6 @@ class _OCIRecipeSubscriptionCreationView(
class OCIRecipeSubscriptionAddView(_OCIRecipeSubscriptionCreationView):
-
page_title = label = "Subscribe to OCI recipe"
@action("Subscribe")
diff --git a/lib/lp/oci/browser/tests/test_ocirecipe.py b/lib/lp/oci/browser/tests/test_ocirecipe.py
index 61ee483..edeed49 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipe.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipe.py
@@ -82,7 +82,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestOCIRecipeNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -141,7 +140,6 @@ class TestOCIRecipeNavigation(TestCaseWithFactory):
class BaseTestOCIRecipeView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/oci/browser/tests/test_ocirecipebuild.py b/lib/lp/oci/browser/tests/test_ocirecipebuild.py
index 5d622e4..526f824 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipebuild.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipebuild.py
@@ -39,7 +39,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrlForOCIRecipeBuild(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -69,7 +68,6 @@ class TestCanonicalUrlForOCIRecipeBuild(TestCaseWithFactory):
class TestOCIRecipeBuildView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -184,7 +182,6 @@ class TestOCIRecipeBuildView(BrowserTestCase):
class TestOCIRecipeBuildOperations(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
index 34362cb..1140e56 100644
--- a/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
+++ b/lib/lp/oci/browser/tests/test_ocirecipesubscription.py
@@ -21,7 +21,6 @@ from lp.testing.pages import (
class BaseTestOCIRecipeView(OCIConfigHelperMixin, BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/oci/interfaces/ociregistrycredentials.py b/lib/lp/oci/interfaces/ociregistrycredentials.py
index 53c0ea2..b1740c1 100644
--- a/lib/lp/oci/interfaces/ociregistrycredentials.py
+++ b/lib/lp/oci/interfaces/ociregistrycredentials.py
@@ -42,7 +42,6 @@ class OCIRegistryCredentialsNotOwner(Unauthorized):
class IOCIRegistryCredentialsView(Interface):
-
id = Int(title=_("ID"), required=True, readonly=True)
def getCredentials():
@@ -64,7 +63,6 @@ class IOCIRegistryCredentialsView(Interface):
class IOCIRegistryCredentialsEditableAttributes(IHasOwner):
-
owner = PersonChoice(
title=_("Owner"),
required=True,
diff --git a/lib/lp/oci/model/ocipushrule.py b/lib/lp/oci/model/ocipushrule.py
index 2d6ca6a..165fb60 100644
--- a/lib/lp/oci/model/ocipushrule.py
+++ b/lib/lp/oci/model/ocipushrule.py
@@ -23,7 +23,6 @@ from lp.services.database.stormbase import StormBase
@implementer(IOCIPushRule)
class OCIPushRule(StormBase):
-
__storm_table__ = "OCIPushRule"
id = Int(primary=True)
diff --git a/lib/lp/oci/model/ocirecipe.py b/lib/lp/oci/model/ocirecipe.py
index 6f2e772..068e286 100644
--- a/lib/lp/oci/model/ocirecipe.py
+++ b/lib/lp/oci/model/ocirecipe.py
@@ -122,7 +122,6 @@ def oci_recipe_modified(recipe, event):
@implementer(IOCIRecipe)
class OCIRecipe(StormBase, WebhookTargetMixin):
-
__storm_table__ = "OCIRecipe"
id = Int(primary=True)
diff --git a/lib/lp/oci/model/ocirecipebuild.py b/lib/lp/oci/model/ocirecipebuild.py
index 7e2301a..b1548a5 100644
--- a/lib/lp/oci/model/ocirecipebuild.py
+++ b/lib/lp/oci/model/ocirecipebuild.py
@@ -77,7 +77,6 @@ from lp.services.webapp.snapshot import notify_modified
@implementer(IOCIFile)
class OCIFile(StormBase):
-
__storm_table__ = "OCIFile"
id = Int(name="id", primary=True)
@@ -115,7 +114,6 @@ class OCIFileSet:
@implementer(IOCIRecipeBuild)
class OCIRecipeBuild(PackageBuildMixin, StormBase):
-
__storm_table__ = "OCIRecipeBuild"
job_type = BuildFarmJobType.OCIRECIPEBUILD
@@ -630,7 +628,6 @@ class OCIRecipeBuildSet(SpecificBuildFarmJobSourceMixin):
@implementer(IMacaroonIssuer)
class OCIRecipeBuildMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "oci-recipe-build"
issuable_via_authserver = True
diff --git a/lib/lp/oci/model/ocirecipebuildbehaviour.py b/lib/lp/oci/model/ocirecipebuildbehaviour.py
index 8165c82..b5fe6a7 100644
--- a/lib/lp/oci/model/ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/model/ocirecipebuildbehaviour.py
@@ -43,7 +43,6 @@ from lp.soyuz.adapters.archivedependencies import get_sources_list_for_building
@implementer(IBuildFarmJobBehaviour)
class OCIRecipeBuildBehaviour(BuilderProxyMixin, BuildFarmJobBehaviourBase):
-
builder_type = "oci"
image_types = [BuildBaseImageType.LXD, BuildBaseImageType.CHROOT]
diff --git a/lib/lp/oci/model/ociregistrycredentials.py b/lib/lp/oci/model/ociregistrycredentials.py
index c31e995..4062655 100644
--- a/lib/lp/oci/model/ociregistrycredentials.py
+++ b/lib/lp/oci/model/ociregistrycredentials.py
@@ -66,7 +66,6 @@ def url_validator(allowed_schemes):
@implementer(IOCIRegistryCredentials)
class OCIRegistryCredentials(StormBase):
-
__storm_table__ = "OCIRegistryCredentials"
id = Int(primary=True)
diff --git a/lib/lp/oci/tests/test_ocipushrule.py b/lib/lp/oci/tests/test_ocipushrule.py
index aecdc7b..724de69 100644
--- a/lib/lp/oci/tests/test_ocipushrule.py
+++ b/lib/lp/oci/tests/test_ocipushrule.py
@@ -20,7 +20,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestOCIPushRule(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -73,7 +72,6 @@ class TestOCIPushRule(OCIConfigHelperMixin, TestCaseWithFactory):
class TestOCIPushRuleSet(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/oci/tests/test_ocirecipe.py b/lib/lp/oci/tests/test_ocirecipe.py
index 1d2a7f4..92d64ac 100644
--- a/lib/lp/oci/tests/test_ocirecipe.py
+++ b/lib/lp/oci/tests/test_ocirecipe.py
@@ -95,7 +95,6 @@ from lp.testing.pages import webservice_for_person
class TestOCIRecipe(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1273,7 +1272,6 @@ class TestOCIRecipeAccessControl(TestCaseWithFactory, OCIConfigHelperMixin):
class TestOCIRecipeProcessors(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1465,7 +1463,6 @@ class TestOCIRecipeProcessors(TestCaseWithFactory):
class TestOCIRecipeSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/oci/tests/test_ocirecipebuild.py b/lib/lp/oci/tests/test_ocirecipebuild.py
index e51ce67..d80ee74 100644
--- a/lib/lp/oci/tests/test_ocirecipebuild.py
+++ b/lib/lp/oci/tests/test_ocirecipebuild.py
@@ -76,7 +76,6 @@ from lp.xmlrpc.interfaces import IPrivateApplication
class TestOCIFileSet(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -102,7 +101,6 @@ class TestOCIFileSet(TestCaseWithFactory):
class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -663,7 +661,6 @@ class TestOCIRecipeBuild(OCIConfigHelperMixin, TestCaseWithFactory):
class TestOCIRecipeBuildSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -785,7 +782,6 @@ class TestOCIRecipeBuildSet(TestCaseWithFactory):
class TestOCIRecipeBuildWebservice(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
index 90ba1b7..e0bd58e 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
@@ -126,7 +126,6 @@ class MakeOCIBuildMixin:
class TestOCIBuildBehaviour(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -148,7 +147,6 @@ class TestOCIBuildBehaviour(TestCaseWithFactory):
class TestAsyncOCIRecipeBuildBehaviour(
StatsMixin, MakeOCIBuildMixin, TestCaseWithFactory
):
-
run_tests_with = AsynchronousDeferredRunTestForBrokenTwisted.make_factory(
timeout=30
)
@@ -1096,7 +1094,6 @@ class TestHandleStatusForOCIRecipeBuild(
@defer.inlineCallbacks
def test_handleStatus_WAITING_OK_absolute_filepath(self):
-
self._createTestFile(
"manifest.json",
'[{"Config": "/notvalid/config_file_1.json", '
@@ -1124,7 +1121,6 @@ class TestHandleStatusForOCIRecipeBuild(
@defer.inlineCallbacks
def test_handleStatus_WAITING_OK_relative_filepath(self):
-
self._createTestFile(
"manifest.json",
'[{"Config": "../config_file_1.json", '
diff --git a/lib/lp/oci/tests/test_ocirecipebuildjob.py b/lib/lp/oci/tests/test_ocirecipebuildjob.py
index a8a1778..d58eb6e 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildjob.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildjob.py
@@ -82,7 +82,6 @@ class FakeOCIBuildJob(OCIRecipeBuildJobDerived):
class TestOCIRecipeBuildJob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -116,7 +115,6 @@ class TestOCIRecipeBuildJob(TestCaseWithFactory):
class TestOCIRecipeBuildJobDerived(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -204,7 +202,6 @@ class MultiArchRecipeMixin:
class TestOCIRegistryUploadJob(
TestCaseWithFactory, MultiArchRecipeMixin, StatsMixin
):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/oci/tests/test_ocirecipejob.py b/lib/lp/oci/tests/test_ocirecipejob.py
index adba265..f7421bd 100644
--- a/lib/lp/oci/tests/test_ocirecipejob.py
+++ b/lib/lp/oci/tests/test_ocirecipejob.py
@@ -22,7 +22,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestOCIRecipeRequestBuildsJob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/oci/tests/test_ociregistryclient.py b/lib/lp/oci/tests/test_ociregistryclient.py
index b4061e7..5128bcd 100644
--- a/lib/lp/oci/tests/test_ociregistryclient.py
+++ b/lib/lp/oci/tests/test_ociregistryclient.py
@@ -86,7 +86,6 @@ class SpyProxyCallsMixin:
class TestOCIRegistryClient(
OCIConfigHelperMixin, SpyProxyCallsMixin, TestCaseWithFactory
):
-
layer = LaunchpadZopelessLayer
retry_count = 0
diff --git a/lib/lp/oci/tests/test_ociregistrycredentials.py b/lib/lp/oci/tests/test_ociregistrycredentials.py
index c844f1a..7a64569 100644
--- a/lib/lp/oci/tests/test_ociregistrycredentials.py
+++ b/lib/lp/oci/tests/test_ociregistrycredentials.py
@@ -24,7 +24,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestOCIRegistryCredentials(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -189,7 +188,6 @@ class TestOCIRegistryCredentials(OCIConfigHelperMixin, TestCaseWithFactory):
class TestOCIRegistryCredentialsSet(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/oci/vocabularies.py b/lib/lp/oci/vocabularies.py
index 88bdb52..edbe8f9 100644
--- a/lib/lp/oci/vocabularies.py
+++ b/lib/lp/oci/vocabularies.py
@@ -35,7 +35,6 @@ class OCIRecipeDistroArchSeriesVocabulary(StormVocabularyBase):
class OCIRegistryCredentialsVocabulary(StormVocabularyBase):
-
_table = OCIRegistryCredentials
def toTerm(self, obj):
diff --git a/lib/lp/registry/browser/codeofconduct.py b/lib/lp/registry/browser/codeofconduct.py
index 531e8c2..38374fe 100644
--- a/lib/lp/registry/browser/codeofconduct.py
+++ b/lib/lp/registry/browser/codeofconduct.py
@@ -48,17 +48,14 @@ from lp.services.webapp.publisher import DataDownloadView
class SignedCodeOfConductSetNavigation(GetitemNavigation):
-
usedfor = ISignedCodeOfConductSet
class CodeOfConductSetNavigation(GetitemNavigation):
-
usedfor = ICodeOfConductSet
class CodeOfConductOverviewMenu(ApplicationMenu):
-
usedfor = ICodeOfConduct
facet = "overview"
links = ["sign", "download"]
@@ -83,7 +80,6 @@ class CodeOfConductOverviewMenu(ApplicationMenu):
class CodeOfConductSetOverviewMenu(ApplicationMenu):
-
usedfor = ICodeOfConductSet
facet = "overview"
links = ["admin"]
@@ -95,7 +91,6 @@ class CodeOfConductSetOverviewMenu(ApplicationMenu):
class SignedCodeOfConductSetOverviewMenu(ApplicationMenu):
-
usedfor = ISignedCodeOfConductSet
facet = "overview"
links = ["register"]
@@ -106,7 +101,6 @@ class SignedCodeOfConductSetOverviewMenu(ApplicationMenu):
class SignedCodeOfConductOverviewMenu(ApplicationMenu):
-
usedfor = ISignedCodeOfConduct
facet = "overview"
links = ["activation", "adminconsole"]
diff --git a/lib/lp/registry/browser/distribution.py b/lib/lp/registry/browser/distribution.py
index b990f6f..e92b1d3 100644
--- a/lib/lp/registry/browser/distribution.py
+++ b/lib/lp/registry/browser/distribution.py
@@ -159,7 +159,6 @@ class DistributionNavigation(
TargetDefaultVCSNavigationMixin,
WebhookTargetNavigationMixin,
):
-
usedfor = IDistribution
@redirection("+source", status=301)
@@ -277,7 +276,6 @@ class DistributionNavigation(
class DistributionSetNavigation(Navigation):
-
usedfor = IDistributionSet
def traverse(self, name):
@@ -289,7 +287,6 @@ class DistributionSetNavigation(Navigation):
class DistributionFacets(StandardLaunchpadFacets):
-
usedfor = IDistribution
@@ -300,7 +297,6 @@ class DistributionSetBreadcrumb(Breadcrumb):
class DistributionSetContextMenu(ContextMenu):
-
usedfor = IDistributionSet
links = ["products", "distributions", "people", "meetings"]
@@ -318,7 +314,6 @@ class DistributionSetContextMenu(ContextMenu):
class DistributionMirrorsNavigationMenu(NavigationMenu):
-
usedfor = IDistributionMirrorMenuMarker
facet = "overview"
links = (
@@ -445,7 +440,6 @@ class DistributionNavigationMenu(NavigationMenu, DistributionLinksMixin):
class DistributionOverviewMenu(ApplicationMenu, DistributionLinksMixin):
-
usedfor = IDistribution
facet = "overview"
links = [
@@ -626,7 +620,6 @@ class DistributionOverviewMenu(ApplicationMenu, DistributionLinksMixin):
class DistributionBugsMenu(PillarBugsMenu):
-
usedfor = IDistribution
facet = "bugs"
@@ -1076,7 +1069,6 @@ class RequireVirtualizedBuildersMixin:
class DistributionAddView(
LaunchpadFormView, RequireVirtualizedBuildersMixin, EnableProcessorsMixin
):
-
schema = IDistribution
label = "Register a new distribution"
field_names = [
@@ -1150,7 +1142,6 @@ class DistributionEditView(
RequireVirtualizedBuildersMixin,
EnableProcessorsMixin,
):
-
schema = IDistribution
field_names = [
"display_name",
@@ -1259,7 +1250,6 @@ class DistributionEditView(
class DistributionAdminView(LaunchpadEditFormView):
-
schema = IDistribution
field_names = [
"official_packages",
@@ -1539,7 +1529,6 @@ class DistributionMirrorsView(LaunchpadView):
class DistributionArchiveMirrorsView(DistributionMirrorsView):
-
heading = "Official Archive Mirrors"
description = (
"These mirrors provide repositories and archives of all "
@@ -1552,7 +1541,6 @@ class DistributionArchiveMirrorsView(DistributionMirrorsView):
class DistributionSeriesMirrorsView(DistributionMirrorsView):
-
heading = "Official CD Mirrors"
description = (
"These mirrors offer ISO images which you can download "
@@ -1614,7 +1602,6 @@ class DistributionMirrorsAdminView(DistributionMirrorsView):
class DistributionUnofficialMirrorsView(DistributionMirrorsAdminView):
-
heading = "Unofficial Mirrors"
@cachedproperty
@@ -1623,7 +1610,6 @@ class DistributionUnofficialMirrorsView(DistributionMirrorsAdminView):
class DistributionPendingReviewMirrorsView(DistributionMirrorsAdminView):
-
heading = "Pending-review mirrors"
show_mirror_type = True
show_freshness = False
@@ -1634,7 +1620,6 @@ class DistributionPendingReviewMirrorsView(DistributionMirrorsAdminView):
class DistributionDisabledMirrorsView(DistributionMirrorsAdminView):
-
heading = "Disabled Mirrors"
@cachedproperty
diff --git a/lib/lp/registry/browser/distributionmirror.py b/lib/lp/registry/browser/distributionmirror.py
index 1f86eab..bab3af4 100644
--- a/lib/lp/registry/browser/distributionmirror.py
+++ b/lib/lp/registry/browser/distributionmirror.py
@@ -50,7 +50,6 @@ from lp.soyuz.browser.sourceslist import (
class DistributionMirrorOverviewMenu(NavigationMenu):
-
usedfor = IDistributionMirror
facet = "overview"
links = ["proberlogs", "edit", "review", "reassign", "delete", "resubmit"]
@@ -174,7 +173,6 @@ class DistributionMirrorView(LaunchpadView):
class DistributionMirrorDeleteView(LaunchpadFormView):
-
schema = IDistributionMirror
field_names = []
next_url = None
@@ -271,7 +269,6 @@ class DistributionMirrorAddView(LaunchpadFormView):
class DistributionMirrorReviewView(LaunchpadEditFormView):
-
schema = IDistributionMirror
field_names = ["status", "whiteboard"]
next_url = None
@@ -302,7 +299,6 @@ class DistributionMirrorReviewView(LaunchpadEditFormView):
class DistributionMirrorEditView(LaunchpadEditFormView):
-
schema = IDistributionMirror
field_names = [
"name",
@@ -342,7 +338,6 @@ class DistributionMirrorEditView(LaunchpadEditFormView):
class DistributionMirrorResubmitView(LaunchpadEditFormView):
-
schema = IDistributionMirror
field_names = []
next_url = None
diff --git a/lib/lp/registry/browser/distributionsourcepackage.py b/lib/lp/registry/browser/distributionsourcepackage.py
index e0d960a..965f138 100644
--- a/lib/lp/registry/browser/distributionsourcepackage.py
+++ b/lib/lp/registry/browser/distributionsourcepackage.py
@@ -141,7 +141,6 @@ class DistributionSourcePackageBreadcrumb(Breadcrumb):
class DistributionSourcePackageFacets(StandardLaunchpadFacets):
-
usedfor = IDistributionSourcePackage
enable_only = [
"overview",
@@ -186,7 +185,6 @@ class DistributionSourcePackageLinksMixin:
class DistributionSourcePackageOverviewMenu(
ApplicationMenu, DistributionSourcePackageLinksMixin
):
-
usedfor = IDistributionSourcePackage
facet = "overview"
links = ["new_bugs", "open_questions"]
@@ -197,7 +195,6 @@ class DistributionSourcePackageBugsMenu(
StructuralSubscriptionMenuMixin,
DistributionSourcePackageLinksMixin,
):
-
usedfor = IDistributionSourcePackage
facet = "bugs"
@@ -210,7 +207,6 @@ class DistributionSourcePackageBugsMenu(
class DistributionSourcePackageAnswersMenu(QuestionTargetAnswersMenu):
-
usedfor = IDistributionSourcePackage
facet = "answers"
@@ -229,7 +225,6 @@ class DistributionSourcePackageNavigation(
StructuralSubscriptionTargetTraversalMixin,
WebhookTargetNavigationMixin,
):
-
usedfor = IDistributionSourcePackage
@redirection("+editbugcontact")
diff --git a/lib/lp/registry/browser/distroseries.py b/lib/lp/registry/browser/distroseries.py
index 5782b54..2729684 100644
--- a/lib/lp/registry/browser/distroseries.py
+++ b/lib/lp/registry/browser/distroseries.py
@@ -155,7 +155,6 @@ class DistroSeriesNavigation(
BugTargetTraversalMixin,
StructuralSubscriptionTargetTraversalMixin,
):
-
usedfor = IDistroSeries
@stepthrough("+lang")
@@ -234,7 +233,6 @@ class DistroSeriesBreadcrumb(Breadcrumb):
class DistroSeriesOverviewMenu(
ApplicationMenu, StructuralSubscriptionMenuMixin
):
-
usedfor = IDistroSeries
facet = "overview"
@@ -319,7 +317,6 @@ class DistroSeriesOverviewMenu(
class DistroSeriesBugsMenu(ApplicationMenu, StructuralSubscriptionMenuMixin):
-
usedfor = IDistroSeries
facet = "bugs"
@@ -342,7 +339,6 @@ class DistroSeriesBugsMenu(ApplicationMenu, StructuralSubscriptionMenuMixin):
class DistroSeriesSpecificationsMenu(
NavigationMenu, HasSpecificationsMenuMixin
):
-
usedfor = IDistroSeries
facet = "specifications"
links = [
@@ -716,7 +712,6 @@ class DistroSeriesAdminView(LaunchpadEditFormView, SeriesStatusMixin):
class IDistroSeriesAddForm(Interface):
-
name = copy_field(
IDistroSeries["name"],
description=_("The name of this series as used for URLs."),
diff --git a/lib/lp/registry/browser/karma.py b/lib/lp/registry/browser/karma.py
index b9c2a09..8c5708f 100644
--- a/lib/lp/registry/browser/karma.py
+++ b/lib/lp/registry/browser/karma.py
@@ -25,7 +25,6 @@ TOP_CONTRIBUTORS_LIMIT = 20
class KarmaActionSetNavigation(Navigation):
-
usedfor = IKarmaActionSet
def traverse(self, name):
@@ -39,7 +38,6 @@ class KarmaActionView(LaunchpadView):
class KarmaActionEditView(LaunchpadEditFormView):
-
schema = IKarmaAction
field_names = ["name", "category", "points", "title", "summary"]
next_url = None
diff --git a/lib/lp/registry/browser/nameblocklist.py b/lib/lp/registry/browser/nameblocklist.py
index dad4965..1d39377 100644
--- a/lib/lp/registry/browser/nameblocklist.py
+++ b/lib/lp/registry/browser/nameblocklist.py
@@ -117,7 +117,6 @@ class NameBlocklistSetView(LaunchpadView):
class NameBlocklistSetNavigation(Navigation):
-
usedfor = INameBlocklistSet
def traverse(self, name):
diff --git a/lib/lp/registry/browser/ociproject.py b/lib/lp/registry/browser/ociproject.py
index fe0817e..43e277a 100644
--- a/lib/lp/registry/browser/ociproject.py
+++ b/lib/lp/registry/browser/ociproject.py
@@ -108,7 +108,6 @@ def getPillarFieldName(pillar):
class OCIProjectAddView(LaunchpadFormView):
-
schema = IOCIProjectName
field_names = ["name"]
next_url = None
@@ -164,7 +163,6 @@ class OCIProjectFormatterAPI(CustomizableFormatter):
class OCIProjectNavigation(
TargetDefaultVCSNavigationMixin, BugTargetTraversalMixin, Navigation
):
-
usedfor = IOCIProject
@stepthrough("+series")
@@ -185,7 +183,6 @@ class OCIProjectBreadcrumb(Breadcrumb):
class OCIProjectFacets(StandardLaunchpadFacets):
-
usedfor = IOCIProject
enable_only = [
"overview",
diff --git a/lib/lp/registry/browser/person.py b/lib/lp/registry/browser/person.py
index f6c7ca2..52639cd 100644
--- a/lib/lp/registry/browser/person.py
+++ b/lib/lp/registry/browser/person.py
@@ -458,7 +458,6 @@ class BranchTraversalMixin:
class PersonNavigation(BranchTraversalMixin, Navigation):
-
usedfor = IPerson
@stepthrough("+expiringmembership")
@@ -630,7 +629,6 @@ class PersonNavigation(BranchTraversalMixin, Navigation):
class PersonSetNavigation(Navigation):
-
usedfor = IPersonSet
def traverse(self, name):
@@ -654,7 +652,6 @@ class PersonSetNavigation(Navigation):
class PersonSetContextMenu(ContextMenu, TopLevelMenuMixin):
-
usedfor = IPersonSet
links = [
@@ -799,7 +796,6 @@ class PersonOverviewMenu(
HasOCIRecipesMenuMixin,
HasCharmRecipesMenuMixin,
):
-
usedfor = IPerson
facet = "overview"
links = [
@@ -969,7 +965,6 @@ class PPANavigationMenuMixIn:
class PersonRelatedSoftwareNavigationMenu(NavigationMenu, CommonMenuLinks):
-
usedfor = IPersonRelatedSoftwareMenu
facet = "overview"
links = (
@@ -1081,7 +1076,6 @@ class DeactivateAccountSchema(Interface):
class PersonDeactivateAccountView(LaunchpadFormView):
-
schema = DeactivateAccountSchema
label = "Deactivate your Launchpad account"
custom_widget_comment = CustomWidgetFactory(
@@ -1327,7 +1321,6 @@ class PersonCloseAccountView(LaunchpadFormView):
class IAccountAdministerSchema(Interface):
-
status = copy_field(IAccount["status"], required=True, readonly=False)
comment = Text(
title=_("Status change comment"), required=True, readonly=False
@@ -2354,7 +2347,6 @@ class PersonCodeOfConductEditView(LaunchpadView):
class PersonEditIRCNicknamesView(LaunchpadFormView):
-
schema = Interface
@property
@@ -2406,7 +2398,6 @@ class PersonEditIRCNicknamesView(LaunchpadFormView):
class PersonEditJabberIDsView(LaunchpadFormView):
-
schema = IJabberID
field_names = ["jabberid"]
@@ -2472,7 +2463,6 @@ class PersonEditJabberIDsView(LaunchpadFormView):
@implementer(IPersonEditMenu)
class PersonEditSSHKeysView(LaunchpadView):
-
info_message = None
error_message = None
@@ -2752,7 +2742,6 @@ class PersonGPGView(LaunchpadView):
class BasePersonEditView(LaunchpadEditFormView):
-
schema = IPerson
field_names = []
@@ -2872,7 +2861,6 @@ class PersonEditView(PersonRenameFormMixin, BasePersonEditView):
class PersonBrandingView(BrandingChangeView):
-
field_names = ["logo", "mugshot"]
schema = IPerson
@@ -4386,7 +4374,6 @@ class PersonLiveFSView(LaunchpadView):
class PersonTimeZoneForm(Interface):
-
time_zone = Choice(
vocabulary="TimezoneName",
title=_("Time zone"),
diff --git a/lib/lp/registry/browser/personociproject.py b/lib/lp/registry/browser/personociproject.py
index 47344c8..d2bd55b 100644
--- a/lib/lp/registry/browser/personociproject.py
+++ b/lib/lp/registry/browser/personociproject.py
@@ -27,7 +27,6 @@ from lp.services.webapp.interfaces import IMultiFacetedBreadcrumb
class PersonOCIProjectNavigation(
PersonTargetDefaultVCSNavigationMixin, Navigation
):
-
usedfor = IPersonOCIProject
@stepthrough("+recipe")
diff --git a/lib/lp/registry/browser/pillar.py b/lib/lp/registry/browser/pillar.py
index a5e5eab..22fec1a 100644
--- a/lib/lp/registry/browser/pillar.py
+++ b/lib/lp/registry/browser/pillar.py
@@ -301,7 +301,6 @@ class PillarViewMixin:
class PillarSharingView(LaunchpadView):
-
page_title = "Sharing"
label = "Sharing information"
@@ -421,7 +420,6 @@ class PillarSharingView(LaunchpadView):
class PillarPersonSharingView(LaunchpadView):
-
page_title = "Person or team"
label = "Information shared with person or team"
diff --git a/lib/lp/registry/browser/poll.py b/lib/lp/registry/browser/poll.py
index f13348f..0851877 100644
--- a/lib/lp/registry/browser/poll.py
+++ b/lib/lp/registry/browser/poll.py
@@ -91,7 +91,6 @@ class PollActionNavigationMenu(PollEditNavigationMenu):
class PollNavigation(Navigation):
-
usedfor = IPoll
@stepthrough("+option")
@@ -517,5 +516,4 @@ class PollOptionAddView(LaunchpadFormView):
class TeamPollsView(PersonView):
-
page_title = "Polls"
diff --git a/lib/lp/registry/browser/product.py b/lib/lp/registry/browser/product.py
index 907d7f1..9962650 100644
--- a/lib/lp/registry/browser/product.py
+++ b/lib/lp/registry/browser/product.py
@@ -214,7 +214,6 @@ class ProductNavigation(
TargetDefaultVCSNavigationMixin,
WebhookTargetNavigationMixin,
):
-
usedfor = IProduct
@stepto(".bzr")
@@ -263,7 +262,6 @@ class ProductNavigation(
class ProductSetNavigation(Navigation):
-
usedfor = IProductSet
def traverse(self, name):
@@ -417,7 +415,6 @@ class ProductInvolvementView(PillarInvolvementView):
class ProductNavigationMenu(NavigationMenu):
-
usedfor = IProduct
facet = "overview"
links = [
@@ -562,7 +559,6 @@ class ProductOverviewMenu(
HasSnapsMenuMixin,
HasCharmRecipesMenuMixin,
):
-
usedfor = IProduct
facet = "overview"
links = [
@@ -652,7 +648,6 @@ class ProductOverviewMenu(
class ProductBugsMenu(PillarBugsMenu, ProductEditLinksMixin):
-
usedfor = IProduct
facet = "bugs"
configurable_bugtracker = True
@@ -736,6 +731,7 @@ class SortSeriesMixin:
@property
def sorted_active_series_list(self):
"""Like `sorted_series_list()` but filters out OBSOLETE series."""
+
# Callback for the filter which only allows series that have not been
# marked obsolete.
def check_active(series):
@@ -1092,7 +1088,7 @@ class ProductView(
("External downloads", self.context.downloadurl),
]
links = []
- for (text, url) in urls:
+ for text, url in urls:
if url is not None:
menu_link = MenuLink(
Link(url, text, icon="external-link", enabled=True)
diff --git a/lib/lp/registry/browser/productrelease.py b/lib/lp/registry/browser/productrelease.py
index 99ae3db..6b46ba4 100644
--- a/lib/lp/registry/browser/productrelease.py
+++ b/lib/lp/registry/browser/productrelease.py
@@ -53,7 +53,6 @@ from lp.services.webapp import (
class ProductReleaseNavigation(Navigation):
-
usedfor = IProductRelease
@stepthrough("+download")
@@ -66,7 +65,6 @@ class ProductReleaseNavigation(Navigation):
class ProductReleaseContextMenu(ContextMenu):
-
usedfor = IProductRelease
links = ("edit", "add_file", "download", "delete")
diff --git a/lib/lp/registry/browser/productseries.py b/lib/lp/registry/browser/productseries.py
index 807d373..1ae0f8b 100644
--- a/lib/lp/registry/browser/productseries.py
+++ b/lib/lp/registry/browser/productseries.py
@@ -500,7 +500,6 @@ class ProductSeriesDetailedDisplayView(ProductSeriesView):
class IPackagingForm(IPackaging):
-
sourcepackagename = copy_field(
IPackaging["sourcepackagename"],
vocabularyName="DistributionSourcePackage",
diff --git a/lib/lp/registry/browser/project.py b/lib/lp/registry/browser/project.py
index a08d20d..5658659 100644
--- a/lib/lp/registry/browser/project.py
+++ b/lib/lp/registry/browser/project.py
@@ -108,7 +108,6 @@ from lp.services.webapp.menu import ALL_LINKS, NavigationMenu
class ProjectNavigation(
Navigation, StructuralSubscriptionTargetTraversalMixin
):
-
usedfor = IProjectGroup
def traverse(self, name):
@@ -134,7 +133,6 @@ class ProjectNavigation(
class ProjectSetNavigation(Navigation):
-
usedfor = IProjectGroupSet
def traverse(self, name):
@@ -152,7 +150,6 @@ class ProjectSetBreadcrumb(Breadcrumb):
class ProjectSetContextMenu(ContextMenu):
-
usedfor = IProjectGroupSet
links = ["register", "listall"]
@@ -210,7 +207,6 @@ class ProjectEditMenuMixin(ProjectAdminMenuMixin):
class ProjectOverviewMenu(ProjectEditMenuMixin, ApplicationMenu):
-
usedfor = IProjectGroup
facet = "overview"
links = [
@@ -267,7 +263,6 @@ class IProjectGroupActionMenu(Interface):
class ProjectActionMenu(
ProjectAdminMenuMixin, StructuralSubscriptionMenuMixin, NavigationMenu
):
-
usedfor = IProjectGroupActionMenu
facet = "overview"
title = "Action menu"
@@ -317,7 +312,6 @@ class ProjectAnswersMenu(QuestionCollectionAnswersMenu):
class ProjectBugsMenu(StructuralSubscriptionMenuMixin, ApplicationMenu):
-
usedfor = IProjectGroup
facet = "bugs"
@@ -420,7 +414,6 @@ class ProjectEditView(LaunchpadEditFormView):
class ProjectReviewView(ProjectEditView):
-
label = "Review upstream project group details"
default_field_names = ["name", "owner", "active", "reviewed"]
@@ -601,7 +594,6 @@ class ProjectSetView(LaunchpadView):
class ProjectAddView(LaunchpadFormView):
-
schema = IProjectGroup
field_names = [
"name",
@@ -641,7 +633,6 @@ class ProjectAddView(LaunchpadFormView):
class ProjectBrandingView(BrandingChangeView):
-
schema = IProjectGroup
field_names = ["icon", "logo", "mugshot"]
@@ -724,7 +715,6 @@ class ProjectAddQuestionView(QuestionAddView):
class ProjectSeriesSpecificationsMenu(ApplicationMenu):
-
usedfor = IProjectGroupSeries
facet = "specifications"
links = ["listall", "doc", "assignments"]
diff --git a/lib/lp/registry/browser/sourcepackage.py b/lib/lp/registry/browser/sourcepackage.py
index 9fb232e..7a3a796 100644
--- a/lib/lp/registry/browser/sourcepackage.py
+++ b/lib/lp/registry/browser/sourcepackage.py
@@ -122,7 +122,6 @@ class SourcePackageFormatterAPI(CustomizableFormatter):
class SourcePackageNavigation(Navigation, BugTargetTraversalMixin):
-
usedfor = ISourcePackage
@stepto("+pots")
@@ -190,7 +189,6 @@ class SourcePackageBreadcrumb(Breadcrumb):
class SourcePackageOverviewMenu(ApplicationMenu):
-
usedfor = ISourcePackage
facet = "overview"
links = [
diff --git a/lib/lp/registry/browser/team.py b/lib/lp/registry/browser/team.py
index 079a284..176a90e 100644
--- a/lib/lp/registry/browser/team.py
+++ b/lib/lp/registry/browser/team.py
@@ -1048,7 +1048,6 @@ class TeamMailingListModerationView(MailingListTeamBaseView):
class TeamMailingListArchiveView(LaunchpadView):
-
label = "Mailing list archive"
def __init__(self, context, request):
@@ -1239,7 +1238,6 @@ class ProposedTeamMembersEditView(LaunchpadFormView):
class TeamBrandingView(BrandingChangeView):
-
schema = ITeam
field_names = ["icon", "logo", "mugshot"]
@@ -1259,7 +1257,6 @@ class ITeamMember(Interface):
class TeamMemberAddView(LaunchpadFormView):
-
schema = ITeamMember
label = "Select the new member"
# XXX: jcsackett 5.7.2011 bug=799847 The assignment of 'false' to the vars
@@ -1335,7 +1332,6 @@ class TeamMemberAddView(LaunchpadFormView):
class TeamNavigation(PersonNavigation):
-
usedfor = ITeam
@stepthrough("+poll")
@@ -1375,7 +1371,6 @@ class TeamBreadcrumb(Breadcrumb):
@implementer(IBrowserPublisher)
class TeamMembershipSelfRenewalView(LaunchpadFormView):
-
# This is needed for our breadcrumbs, as there's no <browser:page>
# declaration for this view.
__name__ = "+self-renewal"
@@ -1789,7 +1784,6 @@ class TeamOverviewMenu(
HasOCIRecipesMenuMixin,
HasCharmRecipesMenuMixin,
):
-
usedfor = ITeam
facet = "overview"
links = [
@@ -2266,7 +2260,6 @@ class TeamLeaveView(LaunchpadFormView, TeamJoinMixin):
class TeamReassignmentView(ObjectReassignmentView):
-
ownerOrMaintainerAttr = "teamowner"
schema = ITeamReassignment
diff --git a/lib/lp/registry/browser/tests/test_announcements.py b/lib/lp/registry/browser/tests/test_announcements.py
index 1c20876..37b41db 100644
--- a/lib/lp/registry/browser/tests/test_announcements.py
+++ b/lib/lp/registry/browser/tests/test_announcements.py
@@ -24,7 +24,6 @@ from lp.testing.views import create_initialized_view
class TestAnnouncement(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_announcement_info(self):
diff --git a/lib/lp/registry/browser/tests/test_branding.py b/lib/lp/registry/browser/tests/test_branding.py
index 3cecf14..d04019a 100644
--- a/lib/lp/registry/browser/tests/test_branding.py
+++ b/lib/lp/registry/browser/tests/test_branding.py
@@ -10,7 +10,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestBrandingChangeView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_codeofconduct.py b/lib/lp/registry/browser/tests/test_codeofconduct.py
index 4045fd3..7315a26 100644
--- a/lib/lp/registry/browser/tests/test_codeofconduct.py
+++ b/lib/lp/registry/browser/tests/test_codeofconduct.py
@@ -17,7 +17,6 @@ from lp.testing.views import create_initialized_view
class TestSignedCodeOfConductAckView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -51,7 +50,6 @@ class TestSignedCodeOfConductAckView(TestCaseWithFactory):
class SignCodeOfConductTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_distribution.py b/lib/lp/registry/browser/tests/test_distribution.py
index 6273aca..a7bb03d 100644
--- a/lib/lp/registry/browser/tests/test_distribution.py
+++ b/lib/lp/registry/browser/tests/test_distribution.py
@@ -40,7 +40,6 @@ from lp.testing.views import create_initialized_view
class TestDistributionNavigation(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def assertRedirects(self, url, expected_url):
diff --git a/lib/lp/registry/browser/tests/test_distribution_views.py b/lib/lp/registry/browser/tests/test_distribution_views.py
index 0855c49..c5e893a 100644
--- a/lib/lp/registry/browser/tests/test_distribution_views.py
+++ b/lib/lp/registry/browser/tests/test_distribution_views.py
@@ -754,7 +754,6 @@ class TestDistributionMirrorsViewMixin:
class TestDistributionArchiveMirrorsView(
TestDistributionMirrorsViewMixin, TestCaseWithFactory
):
-
view = "+archivemirrors"
def configureMirror(self, mirror):
@@ -765,7 +764,6 @@ class TestDistributionArchiveMirrorsView(
class TestDistributionSeriesMirrorsView(
TestDistributionMirrorsViewMixin, TestCaseWithFactory
):
-
view = "+cdmirrors"
def configureMirror(self, mirror):
@@ -777,7 +775,6 @@ class TestDistributionSeriesMirrorsView(
class TestDistributionDisabledMirrorsView(
TestDistributionMirrorsViewMixin, TestCaseWithFactory
):
-
view = "+disabledmirrors"
def configureMirror(self, mirror):
@@ -788,7 +785,6 @@ class TestDistributionDisabledMirrorsView(
class TestDistributionUnofficialMirrorsView(
TestDistributionMirrorsViewMixin, TestCaseWithFactory
):
-
view = "+unofficialmirrors"
def configureMirror(self, mirror):
@@ -798,7 +794,6 @@ class TestDistributionUnofficialMirrorsView(
class TestDistributionPendingReviewMirrorsView(
TestDistributionMirrorsViewMixin, TestCaseWithFactory
):
-
view = "+pendingreviewmirrors"
def configureMirror(self, mirror):
diff --git a/lib/lp/registry/browser/tests/test_distributionsourcepackage.py b/lib/lp/registry/browser/tests/test_distributionsourcepackage.py
index ea7e055..2fe3824 100644
--- a/lib/lp/registry/browser/tests/test_distributionsourcepackage.py
+++ b/lib/lp/registry/browser/tests/test_distributionsourcepackage.py
@@ -28,7 +28,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestDistributionSourcePackageFormatterAPI(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_link(self):
@@ -43,7 +42,6 @@ class TestDistributionSourcePackageFormatterAPI(TestCaseWithFactory):
class TestDistributionSourcePackageChangelogView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_packagediff_query_count(self):
@@ -65,7 +63,6 @@ class TestDistributionSourcePackageChangelogView(TestCaseWithFactory):
class TestDistributionSourcePackagePublishingHistoryView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_publishinghistory_query_count(self):
@@ -171,7 +168,6 @@ class TestDistributionSourcePackagePublishingHistoryView(TestCaseWithFactory):
class TestDistributionSourceView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_distroseries.py b/lib/lp/registry/browser/tests/test_distroseries.py
index 1a344fa..40d9d15 100644
--- a/lib/lp/registry/browser/tests/test_distroseries.py
+++ b/lib/lp/registry/browser/tests/test_distroseries.py
@@ -478,7 +478,6 @@ class DistroSeriesIndexFunctionalTestCase(TestCaseWithFactory):
class TestDistroSeriesDerivationPortlet(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
@property
@@ -641,7 +640,6 @@ class TestMilestoneBatchNavigatorAttribute(TestCaseWithFactory):
class TestDistroSeriesAddView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -695,7 +693,6 @@ class TestDistroSeriesAddView(TestCaseWithFactory):
class TestDistroSeriesInitializeView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_init(self):
@@ -2839,7 +2836,6 @@ class DistroSeriesUniquePackagesPageTestCase(
class TestDistroSeriesEditView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_edit_full_functionality_sets_datereleased(self):
diff --git a/lib/lp/registry/browser/tests/test_distroseries_webservice.py b/lib/lp/registry/browser/tests/test_distroseries_webservice.py
index 0925b13..ce11727 100644
--- a/lib/lp/registry/browser/tests/test_distroseries_webservice.py
+++ b/lib/lp/registry/browser/tests/test_distroseries_webservice.py
@@ -14,7 +14,6 @@ from lp.testing.layers import AppServerLayer
class DistroSeriesWebServiceTestCase(TestCaseWithFactory):
-
layer = AppServerLayer
def assertSameDiffs(self, diffs, ws_diffs):
diff --git a/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py b/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
index 17a8624..f165611 100644
--- a/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
+++ b/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
@@ -45,7 +45,6 @@ from lp.testing.views import create_initialized_view
class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_provides_conversation(self):
@@ -409,7 +408,6 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
class DistroSeriesDifferenceTemplateTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def number_of_request_diff_texts(self, html_or_soup):
diff --git a/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py b/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
index 149fc6f..d4b1568 100644
--- a/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
+++ b/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
@@ -17,7 +17,6 @@ from lp.testing.layers import AppServerLayer
class DistroSeriesDifferenceWebServiceTestCase(TestCaseWithFactory):
-
layer = AppServerLayer
def test_get_difference(self):
diff --git a/lib/lp/registry/browser/tests/test_gpgkey.py b/lib/lp/registry/browser/tests/test_gpgkey.py
index 97cfac4..923b8e2 100644
--- a/lib/lp/registry/browser/tests/test_gpgkey.py
+++ b/lib/lp/registry/browser/tests/test_gpgkey.py
@@ -10,7 +10,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrl(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_canonical_url(self):
@@ -25,7 +24,6 @@ class TestCanonicalUrl(TestCaseWithFactory):
class TestPersonGPGView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_edit_pgp_keys_login_redirect(self):
diff --git a/lib/lp/registry/browser/tests/test_milestone.py b/lib/lp/registry/browser/tests/test_milestone.py
index 4959bd4..e0c380e 100644
--- a/lib/lp/registry/browser/tests/test_milestone.py
+++ b/lib/lp/registry/browser/tests/test_milestone.py
@@ -36,7 +36,6 @@ from lp.testing.views import create_initialized_view
class TestMilestoneViews(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_distroseries_milestone(self):
@@ -166,7 +165,6 @@ class TestMilestoneViews(BrowserTestCase):
class TestAddMilestoneViews(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -233,7 +231,6 @@ class TestAddMilestoneViews(TestCaseWithFactory):
class TestMilestoneEditView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -388,7 +385,6 @@ class TestQueryCountBase(TestCaseWithFactory):
class TestProjectMilestoneIndexQueryCount(TestQueryCountBase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -521,7 +517,6 @@ class TestProjectMilestoneIndexQueryCount(TestQueryCountBase):
class TestProjectGroupMilestoneIndexQueryCount(TestQueryCountBase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -580,7 +575,6 @@ class TestProjectGroupMilestoneIndexQueryCount(TestQueryCountBase):
class TestDistributionMilestoneIndexQueryCount(TestQueryCountBase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -639,7 +633,6 @@ class TestDistributionMilestoneIndexQueryCount(TestQueryCountBase):
class TestMilestoneTagView(TestQueryCountBase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_milestonetag.py b/lib/lp/registry/browser/tests/test_milestonetag.py
index b1d85eb..65075ea 100644
--- a/lib/lp/registry/browser/tests/test_milestonetag.py
+++ b/lib/lp/registry/browser/tests/test_milestonetag.py
@@ -9,7 +9,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestProjectMilestoneTagView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_projectgroup_milestone(self):
diff --git a/lib/lp/registry/browser/tests/test_ociproject.py b/lib/lp/registry/browser/tests/test_ociproject.py
index 112909e..d70c915 100644
--- a/lib/lp/registry/browser/tests/test_ociproject.py
+++ b/lib/lp/registry/browser/tests/test_ociproject.py
@@ -45,7 +45,6 @@ from lp.testing.views import create_initialized_view
class TestOCIProjectFormatterAPI(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_link(self):
@@ -62,7 +61,6 @@ class TestOCIProjectFormatterAPI(TestCaseWithFactory):
class TestOCIProjectNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_canonical_url(self):
@@ -85,7 +83,6 @@ class TestOCIProjectNavigation(TestCaseWithFactory):
class TestOCIProjectView(OCIConfigHelperMixin, BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -433,7 +430,6 @@ class TestOCIProjectView(OCIConfigHelperMixin, BrowserTestCase):
class TestOCIProjectEditView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def submitEditForm(self, browser, name):
@@ -585,7 +581,6 @@ class TestOCIProjectEditView(BrowserTestCase):
class TestOCIProjectAddView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_create_oci_project(self):
@@ -678,7 +673,6 @@ class TestOCIProjectAddView(BrowserTestCase):
class TestOCIProjectSearchView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def assertPaginationIsPresent(
diff --git a/lib/lp/registry/browser/tests/test_peoplemerge.py b/lib/lp/registry/browser/tests/test_peoplemerge.py
index 70c77ce..963aa7a 100644
--- a/lib/lp/registry/browser/tests/test_peoplemerge.py
+++ b/lib/lp/registry/browser/tests/test_peoplemerge.py
@@ -268,7 +268,6 @@ class TestRequestPeopleMergeHiddenEmailAddresses(RequestPeopleMergeMixin):
class TestValidatingMergeView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_person.py b/lib/lp/registry/browser/tests/test_person.py
index 9f35cc4..098c2a6 100644
--- a/lib/lp/registry/browser/tests/test_person.py
+++ b/lib/lp/registry/browser/tests/test_person.py
@@ -109,7 +109,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestPersonNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertRedirect(self, path, redirect):
@@ -347,7 +346,6 @@ class PersonViewOpenidIdentityUrlTestCase(TestCaseWithFactory):
class TestPersonIndexView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_isMergePending(self):
@@ -679,7 +677,6 @@ class TestPersonIndexView(BrowserTestCase):
class TestPersonViewKarma(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -740,7 +737,6 @@ class TestPersonViewKarma(TestCaseWithFactory):
class TestShouldShowPpaSection(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -881,7 +877,6 @@ class TestPersonRenameFormMixin:
class TestPersonEditView(TestPersonRenameFormMixin, TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -1187,7 +1182,6 @@ class TestPersonEditView(TestPersonRenameFormMixin, TestCaseWithFactory):
class TestPersonParticipationView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1675,7 +1669,6 @@ class TestPersonRelatedProjectsView(TestCaseWithFactory):
class TestPersonOCIRegistryCredentialsView(
WithScenarios, BrowserTestCase, OCIConfigHelperMixin
):
-
layer = DatabaseFunctionalLayer
scenarios = [
@@ -2460,7 +2453,6 @@ class TestTeamInvitationView(TestCaseWithFactory):
class TestSubscriptionsView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_person_webservice.py b/lib/lp/registry/browser/tests/test_person_webservice.py
index 7b69d1e..d51c0d2 100644
--- a/lib/lp/registry/browser/tests/test_person_webservice.py
+++ b/lib/lp/registry/browser/tests/test_person_webservice.py
@@ -34,7 +34,6 @@ from lp.testing.pages import LaunchpadWebServiceCaller, webservice_for_person
class TestPersonEmailSecurity(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -71,7 +70,6 @@ class TestPersonEmailSecurity(TestCaseWithFactory):
class TestPersonAccountStatus(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_account_status_history_restricted(self):
@@ -149,7 +147,6 @@ class TestPersonAccountStatus(TestCaseWithFactory):
class TestPersonRepresentation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -179,7 +176,6 @@ class TestPersonRepresentation(TestCaseWithFactory):
class PersonWebServiceTests(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_deactivated_members_query_count(self):
@@ -278,7 +274,6 @@ class PersonWebServiceTests(TestCaseWithFactory):
class PersonSetWebServiceTests(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_pillar_sharing.py b/lib/lp/registry/browser/tests/test_pillar_sharing.py
index 75abf61..6ea9fb7 100644
--- a/lib/lp/registry/browser/tests/test_pillar_sharing.py
+++ b/lib/lp/registry/browser/tests/test_pillar_sharing.py
@@ -46,7 +46,6 @@ from lp.testing.views import create_initialized_view, create_view
class SharingBaseTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
pillar_type = None
@@ -274,7 +273,6 @@ class PillarSharingDetailsMixin:
class TestProductSharingDetailsView(
SharingBaseTestCase, PillarSharingDetailsMixin
):
-
pillar_type = "product"
def setUp(self):
@@ -285,7 +283,6 @@ class TestProductSharingDetailsView(
class TestDistributionSharingDetailsView(
SharingBaseTestCase, PillarSharingDetailsMixin
):
-
pillar_type = "distribution"
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_poll.py b/lib/lp/registry/browser/tests/test_poll.py
index 1192895..773dec5 100644
--- a/lib/lp/registry/browser/tests/test_poll.py
+++ b/lib/lp/registry/browser/tests/test_poll.py
@@ -15,7 +15,6 @@ from lp.testing.views import create_view
class TestPollVoteView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -50,7 +49,6 @@ class TestPollVoteView(TestCaseWithFactory):
class TestPollAddView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/tests/test_product.py b/lib/lp/registry/browser/tests/test_product.py
index 5a0ec75..3d1775f 100644
--- a/lib/lp/registry/browser/tests/test_product.py
+++ b/lib/lp/registry/browser/tests/test_product.py
@@ -62,7 +62,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestProductNavigation(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def assertRedirects(self, url, expected_url):
@@ -800,7 +799,6 @@ class TestProductView(BrowserTestCase):
class TestProductPackagesPortletView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_query_count(self):
@@ -1177,7 +1175,6 @@ class TestProductRdfView(BrowserTestCase):
class TestProductSet(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def makeAllInformationTypes(self):
@@ -1356,7 +1353,6 @@ class TestProductSet(BrowserTestCase):
class TestProductSetBranchView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_git_ssh_url(self):
@@ -1377,7 +1373,6 @@ class TestProductSetBranchView(TestCaseWithFactory):
class TestBrowserProductSetBranchView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
editsshkeys_tag = Tag(
diff --git a/lib/lp/registry/browser/tests/test_productrelease.py b/lib/lp/registry/browser/tests/test_productrelease.py
index 6072ff1..eb27def 100644
--- a/lib/lp/registry/browser/tests/test_productrelease.py
+++ b/lib/lp/registry/browser/tests/test_productrelease.py
@@ -11,7 +11,6 @@ from lp.testing.views import create_initialized_view
class ProductReleaseAddDownloadFileViewTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def makeForm(self, file_name, file_release_type="CODETARBALL"):
diff --git a/lib/lp/registry/browser/tests/test_productseries_views.py b/lib/lp/registry/browser/tests/test_productseries_views.py
index 2ffa4df..b74fd49 100644
--- a/lib/lp/registry/browser/tests/test_productseries_views.py
+++ b/lib/lp/registry/browser/tests/test_productseries_views.py
@@ -20,7 +20,6 @@ from lp.testing.views import create_initialized_view
class TestProductSeries(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_golang_meta_renders(self):
@@ -160,7 +159,6 @@ class TestProductSeriesHelp(TestCaseWithFactory):
class TestWithBrowser(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_timeline_graph(self):
diff --git a/lib/lp/registry/browser/tests/test_projectgroup.py b/lib/lp/registry/browser/tests/test_projectgroup.py
index 222d3e8..d398d33 100644
--- a/lib/lp/registry/browser/tests/test_projectgroup.py
+++ b/lib/lp/registry/browser/tests/test_projectgroup.py
@@ -216,7 +216,6 @@ class TestProjectGroupEditView(TestCaseWithFactory):
class TestProjectGroupAddProductViews(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_information_type(self):
diff --git a/lib/lp/registry/browser/tests/test_rdf.py b/lib/lp/registry/browser/tests/test_rdf.py
index ab3a7f5..7f33aa6 100644
--- a/lib/lp/registry/browser/tests/test_rdf.py
+++ b/lib/lp/registry/browser/tests/test_rdf.py
@@ -12,7 +12,6 @@ from lp.testing.views import create_view
class TestRootRDF(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_root_rdf(self):
diff --git a/lib/lp/registry/browser/tests/test_reassign_team_view.py b/lib/lp/registry/browser/tests/test_reassign_team_view.py
index aeaf7de..545537e 100644
--- a/lib/lp/registry/browser/tests/test_reassign_team_view.py
+++ b/lib/lp/registry/browser/tests/test_reassign_team_view.py
@@ -22,7 +22,6 @@ from lp.testing.views import create_initialized_view
class TestTeamReassignmentView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_non_owner_unauthorised(self):
@@ -115,7 +114,6 @@ class TestTeamReassignmentView(TestCaseWithFactory):
class TestTeamReassignmentViewErrors(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def _makeTeams(self):
diff --git a/lib/lp/registry/browser/tests/test_sourcepackage_views.py b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
index 8044c1a..9e60016 100644
--- a/lib/lp/registry/browser/tests/test_sourcepackage_views.py
+++ b/lib/lp/registry/browser/tests/test_sourcepackage_views.py
@@ -169,7 +169,6 @@ class TestSourcePackageViewHelpers(TestCaseWithFactory):
class TestSourcePackageView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_register_upstream_forbids_proprietary(self):
@@ -226,7 +225,6 @@ class TestSourcePackageView(BrowserTestCase):
class TestSourcePackageUpstreamConnectionsView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -298,7 +296,6 @@ class TestSourcePackageUpstreamConnectionsView(TestCaseWithFactory):
class TestSourcePackagePackagingLinks(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self, *args, **kwargs):
@@ -419,7 +416,6 @@ class TestSourcePackagePackagingLinks(TestCaseWithFactory):
class TestSourcePackageChangeUpstreamView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def test_error_on_proprietary_product(self):
diff --git a/lib/lp/registry/browser/tests/test_sshkey.py b/lib/lp/registry/browser/tests/test_sshkey.py
index 14debfe..79bb767 100644
--- a/lib/lp/registry/browser/tests/test_sshkey.py
+++ b/lib/lp/registry/browser/tests/test_sshkey.py
@@ -18,7 +18,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrl(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_canonical_url(self):
@@ -34,7 +33,6 @@ class TestCanonicalUrl(TestCaseWithFactory):
class TestSSHKeyView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_escaped_message_when_removing_key(self):
diff --git a/lib/lp/registry/browser/tests/test_team.py b/lib/lp/registry/browser/tests/test_team.py
index 6330233..bd6cb8d 100644
--- a/lib/lp/registry/browser/tests/test_team.py
+++ b/lib/lp/registry/browser/tests/test_team.py
@@ -177,7 +177,6 @@ class TestProposedTeamMembersEditView(TestCaseWithFactory):
class TestTeamPersonRenameFormMixin:
-
view_name = None
def test_cannot_rename_team_with_active_ppa(self):
@@ -256,7 +255,6 @@ class TestTeamPersonRenameFormMixin:
class TestTeamEditView(TestTeamPersonRenameFormMixin, TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
view_name = "+edit"
@@ -490,7 +488,6 @@ class TestTeamEditView(TestTeamPersonRenameFormMixin, TestCaseWithFactory):
class TestTeamAddView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
view_name = "+newteam"
@@ -605,7 +602,6 @@ class TestTeamAddView(TestCaseWithFactory):
class TestSimpleTeamAddView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
view_name = "+simplenewteam"
@@ -631,7 +627,6 @@ class TestSimpleTeamAddView(TestCaseWithFactory):
class TestTeamMenu(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -727,7 +722,6 @@ class TestTeamMenu(TestCaseWithFactory):
class TestMailingListArchiveView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_no_messages(self):
@@ -765,7 +759,6 @@ class TestMailingListArchiveView(TestCaseWithFactory):
class TestModeration(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_held_messages_is_batch_navigator(self):
@@ -792,7 +785,6 @@ class TestModeration(TestCaseWithFactory):
class TestTeamMemberAddView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -886,7 +878,6 @@ class TestTeamMemberAddView(TestCaseWithFactory):
class TeamMembershipViewTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_init(self):
@@ -897,7 +888,6 @@ class TeamMembershipViewTestCase(TestCaseWithFactory):
class TestTeamIndexView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1057,7 +1047,6 @@ class TestTeamIndexView(TestCaseWithFactory):
class TestPersonIndexVisibilityView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def createTeams(self):
@@ -1133,7 +1122,6 @@ class TestPersonIndexVisibilityView(TestCaseWithFactory):
class TestTeamContactAddressView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_team_change_contact_address_to_existing_address(self):
diff --git a/lib/lp/registry/browser/tests/test_team_activate_ppa.py b/lib/lp/registry/browser/tests/test_team_activate_ppa.py
index 8ac7330..ef0de6e 100644
--- a/lib/lp/registry/browser/tests/test_team_activate_ppa.py
+++ b/lib/lp/registry/browser/tests/test_team_activate_ppa.py
@@ -10,7 +10,6 @@ from lp.testing.views import create_initialized_view
class TestTeamActivatePPA(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def create_view(self, team):
diff --git a/lib/lp/registry/browser/tests/test_teammembership.py b/lib/lp/registry/browser/tests/test_teammembership.py
index f8c70d3..9856bdc 100644
--- a/lib/lp/registry/browser/tests/test_teammembership.py
+++ b/lib/lp/registry/browser/tests/test_teammembership.py
@@ -19,7 +19,6 @@ from lp.testing.views import create_view
class TestTeamMenu(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/browser/widgets/ocicredentialswidget.py b/lib/lp/registry/browser/widgets/ocicredentialswidget.py
index aed9168..8e01c54 100644
--- a/lib/lp/registry/browser/widgets/ocicredentialswidget.py
+++ b/lib/lp/registry/browser/widgets/ocicredentialswidget.py
@@ -28,7 +28,6 @@ from lp.services.webapp.interfaces import ISingleLineWidgetLayout
@implementer(ISingleLineWidgetLayout, IInputWidget)
class OCICredentialsWidget(BrowserWidget, InputWidget):
-
template = ViewPageTemplateFile("templates/ocicredentialswidget.pt")
_widgets_set_up = False
diff --git a/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py b/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py
index 8f8081e..1ae82cf 100644
--- a/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py
+++ b/lib/lp/registry/browser/widgets/tests/test_ocicredentialswidget.py
@@ -24,7 +24,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestOCICredentialsWidget(OCIConfigHelperMixin, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/enums.py b/lib/lp/registry/enums.py
index bf50514..eac6d43 100644
--- a/lib/lp/registry/enums.py
+++ b/lib/lp/registry/enums.py
@@ -61,7 +61,6 @@ class SharingPermission(DBEnumeratedType):
class BranchSharingPolicy(DBEnumeratedType):
-
PUBLIC = DBItem(
1,
"""
@@ -128,7 +127,6 @@ class BranchSharingPolicy(DBEnumeratedType):
class BugSharingPolicy(DBEnumeratedType):
-
PUBLIC = DBItem(
1,
"""
@@ -188,7 +186,6 @@ class BugSharingPolicy(DBEnumeratedType):
class SpecificationSharingPolicy(DBEnumeratedType):
-
PUBLIC = DBItem(
1,
"""
diff --git a/lib/lp/registry/interfaces/distroseries.py b/lib/lp/registry/interfaces/distroseries.py
index b6342c5..1e33102 100644
--- a/lib/lp/registry/interfaces/distroseries.py
+++ b/lib/lp/registry/interfaces/distroseries.py
@@ -1128,9 +1128,9 @@ class IDistroSeriesPublic(
@export_read_operation()
@operation_for_version("devel")
- def getTranslationTemplateStatistics() -> typing.List[
- DistroSeriesTranslationTemplateStatistics
- ]:
+ def getTranslationTemplateStatistics() -> (
+ typing.List[DistroSeriesTranslationTemplateStatistics]
+ ):
"""Return statistics for translation templates in this series.
The return value is a list of dicts for each template in the series,
diff --git a/lib/lp/registry/interfaces/person.py b/lib/lp/registry/interfaces/person.py
index 2aa3866..383d604 100644
--- a/lib/lp/registry/interfaces/person.py
+++ b/lib/lp/registry/interfaces/person.py
@@ -3115,7 +3115,6 @@ class TeamContactMethod(EnumeratedType):
class ITeamContactAddressForm(Interface):
-
contact_address = TextLine(
title=_("Contact Email Address"), required=False, readonly=False
)
diff --git a/lib/lp/registry/interfaces/pillar.py b/lib/lp/registry/interfaces/pillar.py
index 3387a5e..8380c9d 100644
--- a/lib/lp/registry/interfaces/pillar.py
+++ b/lib/lp/registry/interfaces/pillar.py
@@ -57,7 +57,6 @@ class IPillar(IHeadingContext):
class IHasAliases(Interface):
-
aliases = List(
title=_("Aliases"),
required=False,
diff --git a/lib/lp/registry/interfaces/poll.py b/lib/lp/registry/interfaces/poll.py
index 9da29b1..313f303 100644
--- a/lib/lp/registry/interfaces/poll.py
+++ b/lib/lp/registry/interfaces/poll.py
@@ -47,7 +47,6 @@ from lp.services.fields import ContentNameField
class PollNameField(ContentNameField):
-
errormessage = _("%s is already in use by another poll in this team.")
@property
@@ -475,7 +474,6 @@ class IPollSubset(Interface):
class PollOptionNameField(ContentNameField):
-
errormessage = _("%s is already in use by another option in this poll.")
@property
diff --git a/lib/lp/registry/interfaces/product.py b/lib/lp/registry/interfaces/product.py
index a3e3e45..429e26f 100644
--- a/lib/lp/registry/interfaces/product.py
+++ b/lib/lp/registry/interfaces/product.py
@@ -465,7 +465,6 @@ class IProductModerateRestricted(Interface):
class IProductPublic(Interface):
-
id = Int(title=_("The Project ID"))
def userCanView(user):
@@ -1190,7 +1189,6 @@ patch_reference_property(IProductRelease, "product", IProduct)
@exported_as_webservice_collection(IProduct)
class IProductSet(Interface):
-
title = Attribute("The set of Products registered in the Launchpad")
people = Attribute(
diff --git a/lib/lp/registry/interfaces/productrelease.py b/lib/lp/registry/interfaces/productrelease.py
index 65afe35..7818811 100644
--- a/lib/lp/registry/interfaces/productrelease.py
+++ b/lib/lp/registry/interfaces/productrelease.py
@@ -135,7 +135,6 @@ class UpstreamFileType(DBEnumeratedType):
class ProductReleaseVersionField(ContentNameField):
-
errormessage = _(
"%s is already in use by another version in this release series."
)
diff --git a/lib/lp/registry/interfaces/productseries.py b/lib/lp/registry/interfaces/productseries.py
index 9938a76..391b8a1 100644
--- a/lib/lp/registry/interfaces/productseries.py
+++ b/lib/lp/registry/interfaces/productseries.py
@@ -118,7 +118,6 @@ class IProductSeriesPublic(Interface):
class IProductSeriesLimitedView(Interface):
-
name = exported(
ProductSeriesNameField(
title=_("Name"),
diff --git a/lib/lp/registry/mail/teammembership.py b/lib/lp/registry/mail/teammembership.py
index f1c7d9d..e92b439 100644
--- a/lib/lp/registry/mail/teammembership.py
+++ b/lib/lp/registry/mail/teammembership.py
@@ -85,7 +85,6 @@ class TeamMembershipRecipientReason(RecipientReason):
class TeamMembershipMailer(BaseMailer):
-
app = "registry"
@classmethod
diff --git a/lib/lp/registry/model/accesspolicy.py b/lib/lp/registry/model/accesspolicy.py
index ffcc794..3e85c48 100644
--- a/lib/lp/registry/model/accesspolicy.py
+++ b/lib/lp/registry/model/accesspolicy.py
@@ -79,7 +79,6 @@ def reconcile_access_for_artifacts(
@implementer(IAccessArtifact)
class AccessArtifact(StormBase):
-
__storm_table__ = "AccessArtifact"
id = Int(primary=True)
@@ -224,7 +223,6 @@ class AccessArtifact(StormBase):
@implementer(IAccessPolicy)
class AccessPolicy(StormBase):
-
__storm_table__ = "AccessPolicy"
id = Int(primary=True)
@@ -328,7 +326,6 @@ class AccessPolicy(StormBase):
@implementer(IAccessPolicyArtifact)
class AccessPolicyArtifact(StormBase):
-
__storm_table__ = "AccessPolicyArtifact"
__storm_primary__ = "abstract_artifact_id", "policy_id"
@@ -386,7 +383,6 @@ class AccessPolicyArtifact(StormBase):
@implementer(IAccessArtifactGrant)
class AccessArtifactGrant(StormBase):
-
__storm_table__ = "AccessArtifactGrant"
__storm_primary__ = "abstract_artifact_id", "grantee_id"
@@ -446,7 +442,6 @@ class AccessArtifactGrant(StormBase):
@implementer(IAccessPolicyGrant)
class AccessPolicyGrant(StormBase):
-
__storm_table__ = "AccessPolicyGrant"
__storm_primary__ = "policy_id", "grantee_id"
@@ -542,7 +537,7 @@ class AccessPolicyGrantFlat(StormBase):
)
.group_by(cls.grantee_id, cls.policy_id)
)
- for (person_id, policy_id, has_all, has_some) in result_set:
+ for person_id, policy_id, has_all, has_some in result_set:
person = persons_by_id[person_id]
policy = policies_by_id[policy_id]
permissions_cache[person][policy] = (
diff --git a/lib/lp/registry/model/commercialsubscription.py b/lib/lp/registry/model/commercialsubscription.py
index 0d7af01..deda859 100644
--- a/lib/lp/registry/model/commercialsubscription.py
+++ b/lib/lp/registry/model/commercialsubscription.py
@@ -23,7 +23,6 @@ from lp.services.database.stormbase import StormBase
@implementer(ICommercialSubscription)
class CommercialSubscription(StormBase):
-
__storm_table__ = "CommercialSubscription"
id = Int(primary=True)
diff --git a/lib/lp/registry/model/distroseries.py b/lib/lp/registry/model/distroseries.py
index aa04399..b9660a8 100644
--- a/lib/lp/registry/model/distroseries.py
+++ b/lib/lp/registry/model/distroseries.py
@@ -1843,5 +1843,4 @@ class DistroSeriesSet:
if orderBy is not None:
return DistroSeries.select(where_clause, orderBy=orderBy)
else:
-
return DistroSeries.select(where_clause)
diff --git a/lib/lp/registry/model/gpgkey.py b/lib/lp/registry/model/gpgkey.py
index 8dbbb7d..fbfb7f4 100644
--- a/lib/lp/registry/model/gpgkey.py
+++ b/lib/lp/registry/model/gpgkey.py
@@ -20,7 +20,6 @@ from lp.services.gpg.interfaces import GPGKeyAlgorithm, IGPGHandler
@implementer(IGPGKey)
class GPGKey(SQLBase):
-
_table = "GPGKey"
_defaultOrder = ["owner", "keyid"]
diff --git a/lib/lp/registry/model/mailinglist.py b/lib/lp/registry/model/mailinglist.py
index 542ff3c..ccc31dd 100644
--- a/lib/lp/registry/model/mailinglist.py
+++ b/lib/lp/registry/model/mailinglist.py
@@ -523,7 +523,6 @@ class MailingList(StormBase):
@implementer(IMailingListSet)
class MailingListSet:
-
title = _("Team mailing lists")
def new(self, team, registrant=None):
diff --git a/lib/lp/registry/model/milestone.py b/lib/lp/registry/model/milestone.py
index f7b1abb..e86bb1c 100644
--- a/lib/lp/registry/model/milestone.py
+++ b/lib/lp/registry/model/milestone.py
@@ -78,7 +78,6 @@ def milestone_sort_key(milestone):
@implementer(IHasMilestones)
class HasMilestonesMixin:
-
_milestone_order = (
"milestone_sort_key(Milestone.dateexpected, Milestone.name) DESC"
)
@@ -226,7 +225,6 @@ class MilestoneData:
class Milestone(
SQLBase, MilestoneData, StructuralSubscriptionTargetMixin, HasBugsBase
):
-
active = BoolCol(notNull=True, default=True)
# XXX: EdwinGrubbs 2009-02-06 bug=326384:
diff --git a/lib/lp/registry/model/person.py b/lib/lp/registry/model/person.py
index bb3b265..95a0b14 100644
--- a/lib/lp/registry/model/person.py
+++ b/lib/lp/registry/model/person.py
@@ -372,6 +372,7 @@ def readonly_settings(message, interface):
When you write, the message is raised in a NotImplementedError.
"""
+
# We will make a class that has properties for each field on the
# interface (we expect every name on the interface to correspond to a
# zope.schema field). Each property will have a getter that will
@@ -5217,7 +5218,6 @@ class SSHKeySet:
@implementer(IWikiName)
class WikiName(SQLBase, HasOwnerMixin):
-
_table = "WikiName"
person = ForeignKey(dbName="person", foreignKey="Person", notNull=True)
@@ -5245,7 +5245,6 @@ class WikiNameSet:
@implementer(IJabberID)
class JabberID(SQLBase, HasOwnerMixin):
-
_table = "JabberID"
_defaultOrder = ["jabberid"]
diff --git a/lib/lp/registry/model/pillar.py b/lib/lp/registry/model/pillar.py
index 85f3abe..52474f7 100644
--- a/lib/lp/registry/model/pillar.py
+++ b/lib/lp/registry/model/pillar.py
@@ -326,7 +326,6 @@ class PillarNameSet:
@implementer(IPillarName)
class PillarName(SQLBase):
-
_table = "PillarName"
_defaultOrder = "name"
diff --git a/lib/lp/registry/model/productjob.py b/lib/lp/registry/model/productjob.py
index a42096d..b5b1703 100644
--- a/lib/lp/registry/model/productjob.py
+++ b/lib/lp/registry/model/productjob.py
@@ -357,7 +357,6 @@ class ProductNotificationJob(ProductJobDerived):
class CommericialExpirationMixin:
-
_email_template_name = "product-commercial-subscription-expiration"
_subject_template = (
"The commercial subscription for %s in Launchpad is expiring"
diff --git a/lib/lp/registry/model/teammembership.py b/lib/lp/registry/model/teammembership.py
index dbf088d..ad05906 100644
--- a/lib/lp/registry/model/teammembership.py
+++ b/lib/lp/registry/model/teammembership.py
@@ -437,7 +437,6 @@ class TeamMembershipSet:
@implementer(ITeamParticipation)
class TeamParticipation(SQLBase):
-
_table = "TeamParticipation"
team = ForeignKey(dbName="team", foreignKey="Person", notNull=True)
@@ -631,6 +630,6 @@ def find_team_participations(people, teams=None):
store = IStore(Person)
rs = store.find((Person, Team), *conditions)
- for (person, team) in rs:
+ for person, team in rs:
add_team_to_result(person, team)
return people_teams
diff --git a/lib/lp/registry/scripts/closeaccount.py b/lib/lp/registry/scripts/closeaccount.py
index 970e3e1..bd8fa4d 100644
--- a/lib/lp/registry/scripts/closeaccount.py
+++ b/lib/lp/registry/scripts/closeaccount.py
@@ -643,7 +643,6 @@ def close_account(username, log):
class CloseAccountScript(LaunchpadScript):
-
usage = "%prog [options] (username|email) [...]"
description = (
"Close a person's account, deleting as much personal information "
diff --git a/lib/lp/registry/scripts/createbotaccount.py b/lib/lp/registry/scripts/createbotaccount.py
index 3624a94..c53484d 100644
--- a/lib/lp/registry/scripts/createbotaccount.py
+++ b/lib/lp/registry/scripts/createbotaccount.py
@@ -13,7 +13,6 @@ from lp.services.webapp import canonical_url
class CreateBotAccountScript(LaunchpadScript):
-
description = "Create a bot account."
output = None
diff --git a/lib/lp/registry/scripts/distributionmirror_prober.py b/lib/lp/registry/scripts/distributionmirror_prober.py
index dc23c67..f2fa888 100644
--- a/lib/lp/registry/scripts/distributionmirror_prober.py
+++ b/lib/lp/registry/scripts/distributionmirror_prober.py
@@ -84,7 +84,6 @@ class LoggingMixin:
class RequestManager:
-
# Yes, I want a mutable class attribute because I want changes done in an
# instance to be visible in other instances as well.
host_locks = {}
@@ -473,7 +472,6 @@ class ProberFactory(protocol.ClientFactory):
class RedirectAwareProberFactory(ProberFactory):
-
protocol = RedirectAwareProberProtocol
redirection_count = 0
@@ -657,7 +655,6 @@ class CallScheduler:
class ArchiveMirrorProberCallbacks(LoggingMixin):
-
expected_failures = (
BadResponseCode,
ProberTimeout,
@@ -829,7 +826,6 @@ class ArchiveMirrorProberCallbacks(LoggingMixin):
class MirrorCDImageProberCallbacks(LoggingMixin):
-
expected_failures = (
BadResponseCode,
ConnectionSkipped,
diff --git a/lib/lp/registry/scripts/productreleasefinder/filter.py b/lib/lp/registry/scripts/productreleasefinder/filter.py
index 4787927..ec1fa4f 100644
--- a/lib/lp/registry/scripts/productreleasefinder/filter.py
+++ b/lib/lp/registry/scripts/productreleasefinder/filter.py
@@ -99,7 +99,7 @@ class FilterPattern:
# differs from the number of patterns, then they can't match.
if len(parts) != len(self.patterns):
return False
- for (part, pattern) in zip(parts, self.patterns):
+ for part, pattern in zip(parts, self.patterns):
if not pattern.match(part):
return False
# Everything matches ...
@@ -114,7 +114,7 @@ class FilterPattern:
# contain any children that match this pattern.
if len(parts) >= len(self.patterns):
return False
- for (part, pattern) in zip(parts, self.patterns):
+ for part, pattern in zip(parts, self.patterns):
if not pattern.match(part):
return False
# Everything else matches ...
diff --git a/lib/lp/registry/scripts/suspendbotaccount.py b/lib/lp/registry/scripts/suspendbotaccount.py
index 529d709..2842656 100644
--- a/lib/lp/registry/scripts/suspendbotaccount.py
+++ b/lib/lp/registry/scripts/suspendbotaccount.py
@@ -13,7 +13,6 @@ from lp.services.webapp import canonical_url
class SuspendBotAccountScript(LaunchpadScript):
-
description = "Suspend a bot account."
output = None
diff --git a/lib/lp/registry/scripts/teamparticipation.py b/lib/lp/registry/scripts/teamparticipation.py
index 22f37c0..9532f31 100644
--- a/lib/lp/registry/scripts/teamparticipation.py
+++ b/lib/lp/registry/scripts/teamparticipation.py
@@ -99,11 +99,11 @@ def fetch_team_participation_info(log):
"SELECT team, person FROM TeamMembership"
" WHERE status in %s" % quote(ACTIVE_STATES)
)
- for (team, person) in results:
+ for team, person in results:
team_memberships[team].add(person)
team_participations = defaultdict(set)
results = slurp("SELECT team, person FROM TeamParticipation")
- for (team, person) in results:
+ for team, person in results:
team_participations[team].add(person)
# Don't hold any locks.
diff --git a/lib/lp/registry/scripts/tests/test_closeaccount.py b/lib/lp/registry/scripts/tests/test_closeaccount.py
index 7f5e1bf..458a2a7 100644
--- a/lib/lp/registry/scripts/tests/test_closeaccount.py
+++ b/lib/lp/registry/scripts/tests/test_closeaccount.py
@@ -1187,7 +1187,6 @@ class TestCloseAccount(TestCaseWithFactory):
self.assertRemoved(account_id, person_id)
def test_skip_product_releases_from_inactive_products(self):
-
active_product = self.factory.makeProduct()
inactive_product = self.factory.makeProduct()
inactive_product.active = False
@@ -1226,7 +1225,6 @@ class TestCloseAccount(TestCaseWithFactory):
self.assertRemoved(account_id, person_id)
def test_skip_product_releases_files_from_inactive_products(self):
-
active_product = self.factory.makeProduct()
inactive_product = self.factory.makeProduct()
inactive_product.active = False
diff --git a/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py b/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py
index 7162030..b12fede 100644
--- a/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py
+++ b/lib/lp/registry/scripts/tests/test_populate_distroseriesdiff.py
@@ -437,7 +437,6 @@ class TestFindDifferences(TestCaseWithFactory, FactoryHelper):
class TestDifferenceTypeExpression(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def selectDifferenceType(self, parent_version=None, derived_version=None):
diff --git a/lib/lp/registry/security.py b/lib/lp/registry/security.py
index a5be7ca..a453edc 100644
--- a/lib/lp/registry/security.py
+++ b/lib/lp/registry/security.py
@@ -1129,7 +1129,6 @@ class SeriesDrivers(AuthorizationBase):
class DriveProduct(SeriesDrivers):
-
permission = "launchpad.Driver"
usedfor = IProduct
diff --git a/lib/lp/registry/services/sharingservice.py b/lib/lp/registry/services/sharingservice.py
index b628808..e750aba 100644
--- a/lib/lp/registry/services/sharingservice.py
+++ b/lib/lp/registry/services/sharingservice.py
@@ -858,10 +858,10 @@ class SharingService:
grantee_ids, need_icon=True, need_validity=True
)
)
- for (grantee, permissions, shared_artifact_types) in grant_permissions:
+ for grantee, permissions, shared_artifact_types in grant_permissions:
some_things_shared = len(shared_artifact_types) > 0
grantee_permissions = {}
- for (policy, permission) in permissions.items():
+ for policy, permission in permissions.items():
grantee_permissions[policy.type.name] = permission.name
shared_artifact_type_names = [
info_type.name for info_type in shared_artifact_types
diff --git a/lib/lp/registry/services/tests/test_sharingservice.py b/lib/lp/registry/services/tests/test_sharingservice.py
index c7707ea..29b1258 100644
--- a/lib/lp/registry/services/tests/test_sharingservice.py
+++ b/lib/lp/registry/services/tests/test_sharingservice.py
@@ -181,7 +181,7 @@ class TestSharingService(
grantee_data["web_link"] = absoluteURL(grantee, browser_request)
shared_items_exist = False
permissions = {}
- for (policy, permission) in policy_permissions:
+ for policy, permission in policy_permissions:
permissions[policy.name] = six.ensure_text(permission.name)
if permission == SharingPermission.SOME:
shared_items_exist = True
diff --git a/lib/lp/registry/tests/test_accesspolicy.py b/lib/lp/registry/tests/test_accesspolicy.py
index 19d4f7b..6481f78 100644
--- a/lib/lp/registry/tests/test_accesspolicy.py
+++ b/lib/lp/registry/tests/test_accesspolicy.py
@@ -618,7 +618,6 @@ class TestAccessPolicyGrantSource(TestCaseWithFactory):
class TestAccessPolicyGrantFlatSource(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -855,7 +854,6 @@ class TestAccessPolicyGrantFlatSource(TestCaseWithFactory):
class TestReconcileAccessPolicyArtifacts(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertPoliciesForBug(self, policy_tuples, bug):
diff --git a/lib/lp/registry/tests/test_adapters.py b/lib/lp/registry/tests/test_adapters.py
index 26d5e7a..c70ea2b 100644
--- a/lib/lp/registry/tests/test_adapters.py
+++ b/lib/lp/registry/tests/test_adapters.py
@@ -18,7 +18,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestAdapters(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_sourcepackage_to_distribution_dsp(self):
diff --git a/lib/lp/registry/tests/test_codeofconduct.py b/lib/lp/registry/tests/test_codeofconduct.py
index 67897d9..4d7eeb9 100644
--- a/lib/lp/registry/tests/test_codeofconduct.py
+++ b/lib/lp/registry/tests/test_codeofconduct.py
@@ -63,7 +63,6 @@ class FakeGPGHandlerGood:
class TestSignedCodeOfConductSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_verifyAndStore_bad_signature(self):
diff --git a/lib/lp/registry/tests/test_distribution.py b/lib/lp/registry/tests/test_distribution.py
index 0d024c8..cce72bf 100644
--- a/lib/lp/registry/tests/test_distribution.py
+++ b/lib/lp/registry/tests/test_distribution.py
@@ -108,7 +108,6 @@ PRIVATE_DISTRIBUTION_TYPES = [InformationType.PROPRIETARY]
class TestDistribution(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_pillar_category(self):
@@ -975,7 +974,6 @@ class TestDistribution(TestCaseWithFactory):
class TestDistributionBugInformationTypes(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeDistributionWithPolicy(self, bug_sharing_policy):
@@ -1042,7 +1040,6 @@ class TestDistributionBugInformationTypes(TestCaseWithFactory):
class TestDistributionSpecificationPolicyAndInformationTypes(
TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def makeDistributionWithPolicy(self, specification_sharing_policy):
@@ -2251,7 +2248,6 @@ class TestDistributionWebservice(OCIConfigHelperMixin, TestCaseWithFactory):
class TestDistributionVulnerabilities(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assert_newVulnerability_only_the_required_params(
@@ -2451,7 +2447,6 @@ class TestDistributionVulnerabilities(TestCaseWithFactory):
class TestDistributionVulnerabilitiesWebService(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_vulnerability_api_url_data(self):
@@ -2816,7 +2811,6 @@ class TestDistributionVulnerabilitiesWebService(TestCaseWithFactory):
class TestDistributionPublishedSources(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_has_published_sources_no_sources(self):
diff --git a/lib/lp/registry/tests/test_distributionmirror_prober.py b/lib/lp/registry/tests/test_distributionmirror_prober.py
index 11cbc98..4423f82 100644
--- a/lib/lp/registry/tests/test_distributionmirror_prober.py
+++ b/lib/lp/registry/tests/test_distributionmirror_prober.py
@@ -317,7 +317,6 @@ class TestProberHTTPSProtocolAndFactory(TestCase):
class TestProberProtocolAndFactory(TestCase):
-
layer = TwistedLayer
run_tests_with = AsynchronousDeferredRunTestForBrokenTwisted.make_factory(
timeout=30
@@ -912,7 +911,6 @@ class TestRedirectAwareProberFactoryAndProtocol(TestCase):
class TestMirrorCDImageProberCallbacks(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def makeMirrorProberCallbacks(self):
@@ -1286,7 +1284,6 @@ class TestLoggingMixin(TestCase):
class TestDistroMirrorProberFunctional(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_distributionsourcepackage.py b/lib/lp/registry/tests/test_distributionsourcepackage.py
index d8dffd9..94fef20 100644
--- a/lib/lp/registry/tests/test_distributionsourcepackage.py
+++ b/lib/lp/registry/tests/test_distributionsourcepackage.py
@@ -31,7 +31,6 @@ from lp.testing.matchers import HasQueryCount
class TestDistributionSourcePackage(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_dsp_with_no_series_summary(self):
@@ -241,7 +240,6 @@ class TestDistributionSourcePackage(TestCaseWithFactory):
class TestDistributionSourcePackageFindRelatedArchives(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -377,7 +375,6 @@ class TestDistributionSourcePackageFindRelatedArchives(TestCaseWithFactory):
class TestDistributionSourcePackageInDatabase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_mapping_cache_cleared_on_abort(self):
diff --git a/lib/lp/registry/tests/test_distroseries.py b/lib/lp/registry/tests/test_distroseries.py
index 2c7c329..c7e2111 100644
--- a/lib/lp/registry/tests/test_distroseries.py
+++ b/lib/lp/registry/tests/test_distroseries.py
@@ -195,7 +195,6 @@ class TestDistroSeriesCurrentSourceReleases(
class TestDistroSeries(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_getSuite_release_pocket(self):
@@ -451,7 +450,6 @@ class TestDistroSeries(TestCaseWithFactory):
class TestDistroSeriesPackaging(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -669,7 +667,6 @@ class TestDistroSeriesPackaging(TestCaseWithFactory):
class TestDistroSeriesWebservice(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_language_pack_full_export_requested_not_translations_admin(self):
@@ -750,7 +747,6 @@ class TestDistroSeriesWebservice(TestCaseWithFactory):
class TestDistroSeriesSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def _get_translatables(self):
diff --git a/lib/lp/registry/tests/test_distroseriesdifference.py b/lib/lp/registry/tests/test_distroseriesdifference.py
index 5195913..4530131 100644
--- a/lib/lp/registry/tests/test_distroseriesdifference.py
+++ b/lib/lp/registry/tests/test_distroseriesdifference.py
@@ -44,7 +44,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, LaunchpadFunctionalLayer
class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_implements_interface(self):
@@ -1082,7 +1081,6 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
class DistroSeriesDifferenceSourceTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeDifferencesForAllDifferenceTypes(self, derived_series):
@@ -1490,7 +1488,6 @@ class DistroSeriesDifferenceSourceTestCase(TestCaseWithFactory):
class TestMostRecentComments(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_most_recent_comments(self):
@@ -1512,7 +1509,6 @@ class TestMostRecentComments(TestCaseWithFactory):
class TestMostRecentPublications(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def create_difference(self, derived_series):
diff --git a/lib/lp/registry/tests/test_distroseriesdifferencecomment.py b/lib/lp/registry/tests/test_distroseriesdifferencecomment.py
index 139f1ba..9d7a856 100644
--- a/lib/lp/registry/tests/test_distroseriesdifferencecomment.py
+++ b/lib/lp/registry/tests/test_distroseriesdifferencecomment.py
@@ -29,7 +29,6 @@ def randomize_list(original_list):
class DistroSeriesDifferenceCommentTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_interface(self):
@@ -95,7 +94,6 @@ class DistroSeriesDifferenceCommentTestCase(TestCaseWithFactory):
class TestDistroSeriesDifferenceCommentSource(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_implements_interface(self):
diff --git a/lib/lp/registry/tests/test_distroseriesparent.py b/lib/lp/registry/tests/test_distroseriesparent.py
index 7daa53d..45eb3bd 100644
--- a/lib/lp/registry/tests/test_distroseriesparent.py
+++ b/lib/lp/registry/tests/test_distroseriesparent.py
@@ -121,7 +121,6 @@ class TestDistroSeriesParent(TestCaseWithFactory):
class TestDistroSeriesParentSecurity(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_random_person_is_unauthorized(self):
diff --git a/lib/lp/registry/tests/test_gpgkey.py b/lib/lp/registry/tests/test_gpgkey.py
index 82f8f52..3612c4d 100644
--- a/lib/lp/registry/tests/test_gpgkey.py
+++ b/lib/lp/registry/tests/test_gpgkey.py
@@ -16,7 +16,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class GPGKeySetTests(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_can_add_keys_for_test(self):
diff --git a/lib/lp/registry/tests/test_initderiveddistroseries.py b/lib/lp/registry/tests/test_initderiveddistroseries.py
index 1da0e8f..e5aca06 100644
--- a/lib/lp/registry/tests/test_initderiveddistroseries.py
+++ b/lib/lp/registry/tests/test_initderiveddistroseries.py
@@ -22,7 +22,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer, LaunchpadZopelessLayer
class TestDeriveDistroSeries(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -65,7 +64,6 @@ class TestDeriveDistroSeries(TestCaseWithFactory):
class TestDeriveDistroSeriesMultipleParents(InitializationHelperTestCase):
-
layer = LaunchpadZopelessLayer
def setUpParents(self, packages1, packages2):
diff --git a/lib/lp/registry/tests/test_mailinglist.py b/lib/lp/registry/tests/test_mailinglist.py
index 2e56c15..214d994 100644
--- a/lib/lp/registry/tests/test_mailinglist.py
+++ b/lib/lp/registry/tests/test_mailinglist.py
@@ -44,7 +44,6 @@ from lp.testing.matchers import HasQueryCount
class PersonMailingListTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_autoSubscribeToMailingList_ON_REGISTRATION_someone_else(self):
@@ -796,7 +795,6 @@ class MailingListSetTestCase(TestCaseWithFactory):
class MailingListMessageTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_mailinglistapi.py b/lib/lp/registry/tests/test_mailinglistapi.py
index bf062cf..0a82740 100644
--- a/lib/lp/registry/tests/test_mailinglistapi.py
+++ b/lib/lp/registry/tests/test_mailinglistapi.py
@@ -438,7 +438,6 @@ class MailingListAPIWorkflowTestCase(TestCaseWithFactory):
class MailingListAPIMessageTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_membership_notification_job.py b/lib/lp/registry/tests/test_membership_notification_job.py
index ef9d7e4..fcd35e5 100644
--- a/lib/lp/registry/tests/test_membership_notification_job.py
+++ b/lib/lp/registry/tests/test_membership_notification_job.py
@@ -30,7 +30,6 @@ from lp.testing.sampledata import ADMIN_EMAIL
class MembershipNotificationJobTest(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -128,7 +127,6 @@ class MembershipNotificationJobTest(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_smoke_admining_team(self):
diff --git a/lib/lp/registry/tests/test_milestone_vocabularies.py b/lib/lp/registry/tests/test_milestone_vocabularies.py
index 094e174..5970571 100644
--- a/lib/lp/registry/tests/test_milestone_vocabularies.py
+++ b/lib/lp/registry/tests/test_milestone_vocabularies.py
@@ -116,7 +116,6 @@ class TestMilestoneVocabulary(TestCaseWithFactory):
class TestMilestoneWithDateExpectedVocabulary(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_milestone_with_date_expected(self):
diff --git a/lib/lp/registry/tests/test_nameblocklist.py b/lib/lp/registry/tests/test_nameblocklist.py
index d92ee61..7477119 100644
--- a/lib/lp/registry/tests/test_nameblocklist.py
+++ b/lib/lp/registry/tests/test_nameblocklist.py
@@ -50,7 +50,6 @@ class TestNameBlocklist(TestCaseWithFactory):
return bool(blocklisted)
def test_name_blocklist_match(self):
-
# A name that is not blocklisted returns NULL/None
self.assertIsNone(self.name_blocklist_match("bar"))
@@ -120,7 +119,6 @@ class TestNameBlocklist(TestCaseWithFactory):
class TestNameBlocklistSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_nickname.py b/lib/lp/registry/tests/test_nickname.py
index 5fd928e..f743750 100644
--- a/lib/lp/registry/tests/test_nickname.py
+++ b/lib/lp/registry/tests/test_nickname.py
@@ -12,7 +12,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestNicknameGeneration(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_rejects_invalid_emails(self):
diff --git a/lib/lp/registry/tests/test_notification.py b/lib/lp/registry/tests/test_notification.py
index 6161753..7e91bec 100644
--- a/lib/lp/registry/tests/test_notification.py
+++ b/lib/lp/registry/tests/test_notification.py
@@ -15,7 +15,6 @@ from lp.testing.mail_helpers import pop_notifications
class SendDirectContactEmailTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_send_message(self):
diff --git a/lib/lp/registry/tests/test_ociproject.py b/lib/lp/registry/tests/test_ociproject.py
index 8e9f58b..7845a0d 100644
--- a/lib/lp/registry/tests/test_ociproject.py
+++ b/lib/lp/registry/tests/test_ociproject.py
@@ -35,7 +35,6 @@ from lp.testing.pages import webservice_for_person
class TestOCIProject(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_interface(self):
@@ -189,7 +188,6 @@ class TestOCIProject(TestCaseWithFactory):
class TestOCIProjectSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_interface(self):
diff --git a/lib/lp/registry/tests/test_ociprojectname.py b/lib/lp/registry/tests/test_ociprojectname.py
index 99fbc57..2cfc808 100644
--- a/lib/lp/registry/tests/test_ociprojectname.py
+++ b/lib/lp/registry/tests/test_ociprojectname.py
@@ -16,7 +16,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestOCIProjectName(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_create(self):
@@ -32,7 +31,6 @@ class TestOCIProjectName(TestCaseWithFactory):
class TestOCIProjectNameSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_invalid_name(self):
diff --git a/lib/lp/registry/tests/test_ociprojectseries.py b/lib/lp/registry/tests/test_ociprojectseries.py
index 45391b6..a2337fe 100644
--- a/lib/lp/registry/tests/test_ociprojectseries.py
+++ b/lib/lp/registry/tests/test_ociprojectseries.py
@@ -20,7 +20,6 @@ from lp.testing.pages import webservice_for_person
class TestOCIProjectSeries(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_interface(self):
diff --git a/lib/lp/registry/tests/test_oopsreferences.py b/lib/lp/registry/tests/test_oopsreferences.py
index 8730672..26bd761 100644
--- a/lib/lp/registry/tests/test_oopsreferences.py
+++ b/lib/lp/registry/tests/test_oopsreferences.py
@@ -13,7 +13,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestOopsReferences(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_packaging.py b/lib/lp/registry/tests/test_packaging.py
index aa29cf7..5f1f337 100644
--- a/lib/lp/registry/tests/test_packaging.py
+++ b/lib/lp/registry/tests/test_packaging.py
@@ -330,7 +330,6 @@ class TestDeletePackaging(TestCaseWithFactory):
class TestPackagingSecurity(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self, *args, **kwargs):
diff --git a/lib/lp/registry/tests/test_person.py b/lib/lp/registry/tests/test_person.py
index 2b40f2c..e0f005c 100644
--- a/lib/lp/registry/tests/test_person.py
+++ b/lib/lp/registry/tests/test_person.py
@@ -70,7 +70,6 @@ from lp.testing.views import create_initialized_view
class TestPersonTeams(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -392,7 +391,6 @@ class TestPersonTeams(TestCaseWithFactory):
class TestPerson(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_title_user(self):
@@ -906,7 +904,6 @@ class TestPerson(TestCaseWithFactory):
class TestPersonStates(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1156,7 +1153,6 @@ class TestPersonStates(TestCaseWithFactory):
class TestPersonRelatedBugTaskSearch(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1345,7 +1341,6 @@ class KarmaTestMixin:
class TestPersonKarma(TestCaseWithFactory, KarmaTestMixin):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1445,7 +1440,6 @@ class TestPersonKarma(TestCaseWithFactory, KarmaTestMixin):
class TestAPIParticipation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_participation_query_count(self):
@@ -2092,7 +2086,6 @@ def get_specs(context, user=None, **kwargs):
class TestSpecifications(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_person_close_account_job.py b/lib/lp/registry/tests/test_person_close_account_job.py
index 4862665..5167201 100644
--- a/lib/lp/registry/tests/test_person_close_account_job.py
+++ b/lib/lp/registry/tests/test_person_close_account_job.py
@@ -29,7 +29,6 @@ from lp.testing.layers import CeleryJobLayer, LaunchpadZopelessLayer
class TestPersonCloseAccountJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_close_account_job_valid_username(self):
@@ -113,7 +112,6 @@ class TestPersonCloseAccountJob(TestCaseWithFactory):
class TestPersonCloseAccountJobViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_PersonCloseAccountJob(self):
diff --git a/lib/lp/registry/tests/test_person_deactivate_job.py b/lib/lp/registry/tests/test_person_deactivate_job.py
index b17c5ec..1d1d12d 100644
--- a/lib/lp/registry/tests/test_person_deactivate_job.py
+++ b/lib/lp/registry/tests/test_person_deactivate_job.py
@@ -16,7 +16,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestPersonDeactivateJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makeJob(self):
diff --git a/lib/lp/registry/tests/test_person_merge_job.py b/lib/lp/registry/tests/test_person_merge_job.py
index 1a39e6b..26fb9f4 100644
--- a/lib/lp/registry/tests/test_person_merge_job.py
+++ b/lib/lp/registry/tests/test_person_merge_job.py
@@ -54,7 +54,6 @@ def transfer_email(job):
class TestPersonMergeJob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_person_sort_key.py b/lib/lp/registry/tests/test_person_sort_key.py
index 95651c7..9e6e816 100644
--- a/lib/lp/registry/tests/test_person_sort_key.py
+++ b/lib/lp/registry/tests/test_person_sort_key.py
@@ -55,7 +55,6 @@ class TestPersonSortKeyBase:
class TestPersonSortKeyInDatabase(TestPersonSortKeyBase, TestCase):
-
layer = DatabaseLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_person_vocabularies.py b/lib/lp/registry/tests/test_person_vocabularies.py
index 21c6ecb..8ad422a 100644
--- a/lib/lp/registry/tests/test_person_vocabularies.py
+++ b/lib/lp/registry/tests/test_person_vocabularies.py
@@ -33,7 +33,6 @@ from lp.testing.matchers import HasQueryCount
class VocabularyTestBase:
-
vocabulary_name = None
def setUp(self):
diff --git a/lib/lp/registry/tests/test_personmerge.py b/lib/lp/registry/tests/test_personmerge.py
index 16ce58f..170bfb4 100644
--- a/lib/lp/registry/tests/test_personmerge.py
+++ b/lib/lp/registry/tests/test_personmerge.py
@@ -917,7 +917,6 @@ class TestMergePeople(TestCaseWithFactory, KarmaTestMixin):
class TestMergeMailingListSubscriptions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_personset.py b/lib/lp/registry/tests/test_personset.py
index d1e058c..07acc60 100644
--- a/lib/lp/registry/tests/test_personset.py
+++ b/lib/lp/registry/tests/test_personset.py
@@ -641,7 +641,6 @@ class TestCreatePersonAndEmail(TestCase):
class TestPersonSetBranchCounts(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -665,7 +664,6 @@ class TestPersonSetBranchCounts(TestCaseWithFactory):
class TestPersonSetEnsurePerson(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
email_address = "testing.ensure.person@xxxxxxxxxxx"
displayname = "Testing ensurePerson"
@@ -708,7 +706,6 @@ class TestPersonSetEnsurePerson(TestCaseWithFactory):
class TestPersonSetGetOrCreateByOpenIDIdentifier(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -823,7 +820,6 @@ class TestPersonSetGetOrCreateByOpenIDIdentifier(TestCaseWithFactory):
class TestPersonSetGetOrCreateSoftwareCenterCustomer(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -990,7 +986,6 @@ class TestPersonSetGetOrCreateSoftwareCenterCustomer(TestCaseWithFactory):
class TestPersonGetUsernameForSSO(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1026,7 +1021,6 @@ class TestPersonGetUsernameForSSO(TestCaseWithFactory):
class TestPersonSetUsernameFromSSO(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1163,7 +1157,6 @@ class TestPersonSetUsernameFromSSO(TestCaseWithFactory):
class TestPersonGetSSHKeysForSSO(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1198,7 +1191,6 @@ class TestPersonGetSSHKeysForSSO(TestCaseWithFactory):
class TestPersonAddSSHKeyFromSSO(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1275,7 +1267,6 @@ class TestPersonAddSSHKeyFromSSO(TestCaseWithFactory):
class TestPersonDeleteSSHKeyFromSSO(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1365,7 +1356,6 @@ class TestPersonDeleteSSHKeyFromSSO(TestCaseWithFactory):
class TestGDPRUserRetrieval(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_pillar.py b/lib/lp/registry/tests/test_pillar.py
index 950865b..dc75db5 100644
--- a/lib/lp/registry/tests/test_pillar.py
+++ b/lib/lp/registry/tests/test_pillar.py
@@ -14,7 +14,6 @@ from lp.testing.matchers import Provides
class TestPillarNameSet(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_search_correctly_ranks_by_aliases(self):
@@ -50,7 +49,6 @@ class TestPillarNameSet(TestCaseWithFactory):
class TestPillarPerson(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements(self):
diff --git a/lib/lp/registry/tests/test_pillaraffiliation.py b/lib/lp/registry/tests/test_pillaraffiliation.py
index 26880ed..ccb04ad 100644
--- a/lib/lp/registry/tests/test_pillaraffiliation.py
+++ b/lib/lp/registry/tests/test_pillaraffiliation.py
@@ -19,7 +19,6 @@ from lp.testing.matchers import HasQueryCount
class TestPillarAffiliation(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_distro_badge_icon(self):
@@ -188,7 +187,6 @@ class _TestBugTaskorBranchMixin:
class TestBugTaskPillarAffiliation(
_TestBugTaskorBranchMixin, TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def test_correct_pillars_are_used(self):
@@ -244,7 +242,6 @@ class TestBugTaskPillarAffiliation(
class TestBranchPillarAffiliation(
_TestBugTaskorBranchMixin, TestCaseWithFactory
):
-
layer = DatabaseFunctionalLayer
def test_correct_pillars_are_used(self):
@@ -287,7 +284,6 @@ class TestBranchPillarAffiliation(
class CodeReviewVotePillarAffiliationTestCase(TestBranchPillarAffiliation):
-
layer = DatabaseFunctionalLayer
def makeCodeReviewVote(self, branch):
@@ -332,7 +328,6 @@ class CodeReviewVotePillarAffiliationTestCase(TestBranchPillarAffiliation):
class TestDistroSeriesPillarAffiliation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_correct_pillars_are_used(self):
@@ -374,7 +369,6 @@ class TestDistroSeriesPillarAffiliation(TestCaseWithFactory):
class TestProductSeriesPillarAffiliation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_correct_pillars_are_used(self):
@@ -433,7 +427,6 @@ class TestProductSeriesPillarAffiliation(TestCaseWithFactory):
class TestQuestionPillarAffiliation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_correct_pillars_are_used_for_product(self):
@@ -598,7 +591,6 @@ class TestQuestionPillarAffiliation(TestCaseWithFactory):
class TestSpecificationPillarAffiliation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_correct_pillars_are_used_for_product(self):
diff --git a/lib/lp/registry/tests/test_prf_finder.py b/lib/lp/registry/tests/test_prf_finder.py
index 7e0b408..0c1ee63 100644
--- a/lib/lp/registry/tests/test_prf_finder.py
+++ b/lib/lp/registry/tests/test_prf_finder.py
@@ -61,7 +61,6 @@ class FindReleasesTestCase(TestCase):
class FindReleasesDBTestCase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_findReleases_permissions(self):
@@ -93,7 +92,6 @@ class FindReleasesDBTestCase(TestCaseWithFactory):
class GetFiltersTestCase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_getFilters(self):
@@ -244,7 +242,6 @@ class HandleProductTestCase(TestCase):
class HandleReleaseTestCase(TestCase):
-
layer = LaunchpadZopelessLayer
def create_tarball(self, file_name):
diff --git a/lib/lp/registry/tests/test_product.py b/lib/lp/registry/tests/test_product.py
index 8738a3e..d356ed1 100644
--- a/lib/lp/registry/tests/test_product.py
+++ b/lib/lp/registry/tests/test_product.py
@@ -1544,7 +1544,6 @@ class TestProduct(TestCaseWithFactory):
class TestProductBugInformationTypes(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeProductWithPolicy(self, bug_sharing_policy):
@@ -1604,7 +1603,6 @@ class TestProductBugInformationTypes(TestCaseWithFactory):
class TestProductSpecificationPolicyAndInformationTypes(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeProductWithPolicy(self, specification_sharing_policy):
@@ -1698,7 +1696,6 @@ class TestProductSpecificationPolicyAndInformationTypes(TestCaseWithFactory):
class ProductPermissionTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_owner_can_edit(self):
@@ -2326,7 +2323,6 @@ def get_specs(product, user=None, **kwargs):
class TestSpecifications(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -2615,7 +2611,6 @@ class TestWebService(WebServiceTestCase):
class TestProductSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeAllInformationTypes(self):
diff --git a/lib/lp/registry/tests/test_productjob.py b/lib/lp/registry/tests/test_productjob.py
index 5de315e..a737144 100644
--- a/lib/lp/registry/tests/test_productjob.py
+++ b/lib/lp/registry/tests/test_productjob.py
@@ -526,7 +526,6 @@ class ProductNotificationJobTestCase(TestCaseWithFactory):
class CommericialExpirationMixin(CommercialHelpers):
-
layer = DatabaseFunctionalLayer
EXPIRE_SUBSCRIPTION = False
diff --git a/lib/lp/registry/tests/test_projectgroup.py b/lib/lp/registry/tests/test_projectgroup.py
index 2d97664..e36dc71 100644
--- a/lib/lp/registry/tests/test_projectgroup.py
+++ b/lib/lp/registry/tests/test_projectgroup.py
@@ -63,7 +63,6 @@ class TestProjectGroup(TestCaseWithFactory):
class ProjectGroupSearchTestCase(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -160,7 +159,6 @@ class ProjectGroupSearchTestCase(TestCaseWithFactory):
class TestProjectGroupPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -185,7 +183,6 @@ class TestProjectGroupPermissions(TestCaseWithFactory):
class TestMilestones(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_milestones_privacy(self):
@@ -220,7 +217,6 @@ class TestMilestones(TestCaseWithFactory):
class TestLaunchpadlibAPI(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_inappropriate_deactivation_does_not_cause_an_OOPS(self):
diff --git a/lib/lp/registry/tests/test_service_usage.py b/lib/lp/registry/tests/test_service_usage.py
index 117b76a..07fae7e 100644
--- a/lib/lp/registry/tests/test_service_usage.py
+++ b/lib/lp/registry/tests/test_service_usage.py
@@ -174,7 +174,6 @@ class TestProductUsageEnums(TestCaseWithFactory, UsageEnumsMixin):
class TestProductSeriesUsageEnums(TestCaseWithFactory, SeriesUsageEnumsMixin):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -194,7 +193,6 @@ class TestProductSeriesUsageEnums(TestCaseWithFactory, SeriesUsageEnumsMixin):
class TestDistroSeriesUsageEnums(TestCaseWithFactory, SeriesUsageEnumsMixin):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_sourcepackage.py b/lib/lp/registry/tests/test_sourcepackage.py
index b839a18..150a4e6 100644
--- a/lib/lp/registry/tests/test_sourcepackage.py
+++ b/lib/lp/registry/tests/test_sourcepackage.py
@@ -41,7 +41,6 @@ from lp.testing.views import create_initialized_view
class TestSourcePackage(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_interface_consistency(self):
diff --git a/lib/lp/registry/tests/test_sourcepackagename.py b/lib/lp/registry/tests/test_sourcepackagename.py
index 89db0a0..bfae3cd 100644
--- a/lib/lp/registry/tests/test_sourcepackagename.py
+++ b/lib/lp/registry/tests/test_sourcepackagename.py
@@ -12,7 +12,6 @@ from lp.testing.layers import DatabaseLayer
class TestSourcePackageNameSet(TestCase):
-
layer = DatabaseLayer
def test_invalid_name(self):
diff --git a/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py b/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py
index bb800c8..15b13f6 100644
--- a/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py
+++ b/lib/lp/registry/tests/test_sourcepackagename_vocabulary.py
@@ -45,7 +45,6 @@ class MatchesSourcePackageNameTerms(Matcher):
class TestSourcePackageNameVocabulary(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_subscribers.py b/lib/lp/registry/tests/test_subscribers.py
index 3af751e..adb5cb3 100644
--- a/lib/lp/registry/tests/test_subscribers.py
+++ b/lib/lp/registry/tests/test_subscribers.py
@@ -32,7 +32,6 @@ from lp.testing.mail_helpers import pop_notifications
class LicensesModifiedEventTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_init(self):
@@ -49,7 +48,6 @@ class LicensesModifiedEventTestCase(TestCaseWithFactory):
class ProductLicensesModifiedTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def make_product_event(self, licenses):
@@ -92,7 +90,6 @@ class ProductLicensesModifiedTestCase(TestCaseWithFactory):
class LicenseNotificationTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def make_product_user(self, licenses):
diff --git a/lib/lp/registry/tests/test_suitesourcepackage.py b/lib/lp/registry/tests/test_suitesourcepackage.py
index ea04a64..087fa43 100644
--- a/lib/lp/registry/tests/test_suitesourcepackage.py
+++ b/lib/lp/registry/tests/test_suitesourcepackage.py
@@ -10,7 +10,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestSuiteSourcePackage(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_construction(self):
diff --git a/lib/lp/registry/tests/test_team.py b/lib/lp/registry/tests/test_team.py
index 91ac467..e00db68 100644
--- a/lib/lp/registry/tests/test_team.py
+++ b/lib/lp/registry/tests/test_team.py
@@ -43,7 +43,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, FunctionalLayer
class TestTeamContactAddress(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def getAllEmailAddresses(self):
@@ -210,7 +209,6 @@ class TestTeamGetTeamAdminsEmailAddresses(TestCaseWithFactory):
class TestDefaultRenewalPeriodIsRequiredForSomeTeams(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -254,7 +252,6 @@ class TestDefaultRenewalPeriodIsRequiredForSomeTeams(TestCaseWithFactory):
class TestDefaultMembershipPeriod(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -548,7 +545,6 @@ class TestTeamMembershipPolicyValidator(TestCaseWithFactory):
class TestVisibilityConsistencyWarning(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -624,7 +620,6 @@ class TestVisibilityConsistencyWarning(TestCaseWithFactory):
class TestPersonJoinTeam(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_join_restricted_team_error(self):
diff --git a/lib/lp/registry/tests/test_team_webservice.py b/lib/lp/registry/tests/test_team_webservice.py
index c46560b..7b5a1e2 100644
--- a/lib/lp/registry/tests/test_team_webservice.py
+++ b/lib/lp/registry/tests/test_team_webservice.py
@@ -20,7 +20,6 @@ from lp.testing.layers import AppServerLayer, DatabaseFunctionalLayer
class TestTeamJoining(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_restricted_rejects_membership(self):
@@ -63,7 +62,6 @@ class TestTeamJoining(TestCaseWithFactory):
class TeamObsoleteAPITestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_newTeam_obsolete_subscription_policy(self):
diff --git a/lib/lp/registry/tests/test_teammembership.py b/lib/lp/registry/tests/test_teammembership.py
index 403d7cd..a76ae2f 100644
--- a/lib/lp/registry/tests/test_teammembership.py
+++ b/lib/lp/registry/tests/test_teammembership.py
@@ -120,7 +120,6 @@ class TestTeamMembershipSetScripts(TestCaseWithFactory):
class TestTeamMembershipSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1324,7 +1323,6 @@ class TestTeamMembershipSendExpirationWarningEmail(TestCaseWithFactory):
class TestCheckTeamParticipationScript(TestCase):
-
layer = DatabaseFunctionalLayer
def _runScript(self, *args):
@@ -1528,7 +1526,6 @@ class TestCheckTeamParticipationScript(TestCase):
class TestCheckTeamParticipationScriptPerformance(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_queries(self):
diff --git a/lib/lp/registry/tests/test_teammembership_webservice.py b/lib/lp/registry/tests/test_teammembership_webservice.py
index 386bee4..ed11467 100644
--- a/lib/lp/registry/tests/test_teammembership_webservice.py
+++ b/lib/lp/registry/tests/test_teammembership_webservice.py
@@ -13,7 +13,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestTeamMembershipTransitions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_xmlrpc.py b/lib/lp/registry/tests/test_xmlrpc.py
index a0f5e74..dcfb8fe 100644
--- a/lib/lp/registry/tests/test_xmlrpc.py
+++ b/lib/lp/registry/tests/test_xmlrpc.py
@@ -27,7 +27,6 @@ from lp.testing.xmlrpc import XMLRPCTestTransport
class TestCanonicalSSOApplication(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -89,7 +88,6 @@ class TestCanonicalSSOApplication(TestCaseWithFactory):
class TestMailingListXMLRPC(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -152,7 +150,6 @@ class TestMailingListXMLRPC(TestCaseWithFactory):
class TestMailingListXMLRPCMessage(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/registry/tests/test_yuitests.py b/lib/lp/registry/tests/test_yuitests.py
index 45d0a80..79cd2d8 100644
--- a/lib/lp/registry/tests/test_yuitests.py
+++ b/lib/lp/registry/tests/test_yuitests.py
@@ -10,7 +10,6 @@ from lp.testing.layers import YUITestLayer
class RegistryYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "RegistryYUIUnitTests"
diff --git a/lib/lp/registry/vocabularies.py b/lib/lp/registry/vocabularies.py
index 411f28c..4a993c7 100644
--- a/lib/lp/registry/vocabularies.py
+++ b/lib/lp/registry/vocabularies.py
@@ -2161,7 +2161,6 @@ class SourcePackageNameVocabulary(NamedStormHugeVocabulary):
@implementer(IHugeVocabulary)
class DistributionSourcePackageVocabulary(FilteredVocabularyBase):
-
displayname = "Select a package"
step_title = "Search by name"
diff --git a/lib/lp/scripts/garbo.py b/lib/lp/scripts/garbo.py
index b8c425c..86adeaa 100644
--- a/lib/lp/scripts/garbo.py
+++ b/lib/lp/scripts/garbo.py
@@ -1048,7 +1048,6 @@ class RevisionAuthorEmailLinker(TunableLoop):
class PersonPruner(TunableLoop):
-
maximum_chunk_size = 1000
def __init__(self, log, abort_time=None):
@@ -2283,7 +2282,6 @@ class BaseDatabaseGarbageCollector(LaunchpadCronScript):
)
def add_my_options(self):
-
self.parser.add_option(
"-x",
"--experimental",
diff --git a/lib/lp/scripts/utilities/tests/test_audit_security_settings.py b/lib/lp/scripts/utilities/tests/test_audit_security_settings.py
index 7108e13..bf9522b 100644
--- a/lib/lp/scripts/utilities/tests/test_audit_security_settings.py
+++ b/lib/lp/scripts/utilities/tests/test_audit_security_settings.py
@@ -9,7 +9,6 @@ from lp.testing.layers import BaseLayer
class TestAuditSecuritySettings(TestCase):
-
layer = BaseLayer
def setUp(self):
diff --git a/lib/lp/services/auth/browser.py b/lib/lp/services/auth/browser.py
index c704026..b10d64b 100644
--- a/lib/lp/services/auth/browser.py
+++ b/lib/lp/services/auth/browser.py
@@ -39,7 +39,6 @@ class IAccessTokenCreateSchema(Interface):
class AccessTokensView(LaunchpadFormView):
-
schema = IAccessTokenCreateSchema
custom_widget_scopes = LabeledMultiCheckBoxWidget
custom_widget_date_expires = DateTimeWidget
diff --git a/lib/lp/services/auth/tests/test_browser.py b/lib/lp/services/auth/tests/test_browser.py
index 9921188..3d237c0 100644
--- a/lib/lp/services/auth/tests/test_browser.py
+++ b/lib/lp/services/auth/tests/test_browser.py
@@ -38,7 +38,6 @@ token_listing_tag = soupmatchers.Tag(
class TestAccessTokenViewBase:
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/auth/tests/test_model.py b/lib/lp/services/auth/tests/test_model.py
index bfd8c20..9449f0c 100644
--- a/lib/lp/services/auth/tests/test_model.py
+++ b/lib/lp/services/auth/tests/test_model.py
@@ -37,7 +37,6 @@ from lp.testing.pages import webservice_for_person
class TestAccessToken(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_owner_can_edit(self):
@@ -169,7 +168,6 @@ class TestAccessToken(TestCaseWithFactory):
class TestAccessTokenSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_new(self):
@@ -396,7 +394,6 @@ class TestAccessTokenSet(TestCaseWithFactory):
class TestAccessTokenTargetBase:
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/auth/tests/test_yuitests.py b/lib/lp/services/auth/tests/test_yuitests.py
index be22651..ed1c53c 100644
--- a/lib/lp/services/auth/tests/test_yuitests.py
+++ b/lib/lp/services/auth/tests/test_yuitests.py
@@ -10,7 +10,6 @@ from lp.testing.layers import YUITestLayer
class AuthYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "AuthYUIUnitTests"
diff --git a/lib/lp/services/authserver/tests/test_authserver.py b/lib/lp/services/authserver/tests/test_authserver.py
index 3234deb..2f29fd1 100644
--- a/lib/lp/services/authserver/tests/test_authserver.py
+++ b/lib/lp/services/authserver/tests/test_authserver.py
@@ -38,7 +38,6 @@ from lp.xmlrpc.interfaces import IPrivateApplication
class TestAuthServerInterfaces(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_application_interface(self):
@@ -137,7 +136,6 @@ class GetUserAndSSHKeysTests(TestCaseWithFactory):
@implementer(IMacaroonIssuer)
class FakeMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "test"
issuable_via_authserver = True
_root_secret = "test"
@@ -164,7 +162,6 @@ class FakeMacaroonIssuer(MacaroonIssuerBase):
class MacaroonTests(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/services/config/tests/test_database_config.py b/lib/lp/services/config/tests/test_database_config.py
index 84b4dd3..9139130 100644
--- a/lib/lp/services/config/tests/test_database_config.py
+++ b/lib/lp/services/config/tests/test_database_config.py
@@ -8,7 +8,6 @@ from lp.testing.layers import DatabaseLayer
class TestDatabaseConfig(TestCase):
-
layer = DatabaseLayer
def test_override(self):
diff --git a/lib/lp/services/config/tests/test_zcml.py b/lib/lp/services/config/tests/test_zcml.py
index 475ee48..fc5b8e5 100644
--- a/lib/lp/services/config/tests/test_zcml.py
+++ b/lib/lp/services/config/tests/test_zcml.py
@@ -19,7 +19,6 @@ from lp.testing.layers import BaseLayer
class TestIncludeLaunchpadOverrides(ConfigTestCase):
-
layer = BaseLayer
def test_includes_overrides(self):
diff --git a/lib/lp/services/crypto/tests/test_model.py b/lib/lp/services/crypto/tests/test_model.py
index 5b6921d..786b35d 100644
--- a/lib/lp/services/crypto/tests/test_model.py
+++ b/lib/lp/services/crypto/tests/test_model.py
@@ -26,7 +26,6 @@ class FakeEncryptedContainer(NaClEncryptedContainerBase):
class TestNaClEncryptedContainerBase(TestCase):
-
layer = ZopelessLayer
def test_public_key_valid(self):
diff --git a/lib/lp/services/database/locking.py b/lib/lp/services/database/locking.py
index 8e313a5..ddbfc99 100644
--- a/lib/lp/services/database/locking.py
+++ b/lib/lp/services/database/locking.py
@@ -20,7 +20,6 @@ class AdvisoryLockHeld(Exception):
class LockType(DBEnumeratedType):
-
BRANCH_SCAN = DBItem(
0,
"""Branch scan.
diff --git a/lib/lp/services/database/multitablecopy.py b/lib/lp/services/database/multitablecopy.py
index 8d512f6..1865206 100644
--- a/lib/lp/services/database/multitablecopy.py
+++ b/lib/lp/services/database/multitablecopy.py
@@ -29,7 +29,6 @@ class PouringLoop:
logger,
batch_pouring_callback=None,
):
-
self.from_table = str(from_table)
self.to_table = str(to_table)
self.transaction_manager = transaction_manager
diff --git a/lib/lp/services/database/policy.py b/lib/lp/services/database/policy.py
index 39e5c2a..d0924f4 100644
--- a/lib/lp/services/database/policy.py
+++ b/lib/lp/services/database/policy.py
@@ -106,7 +106,6 @@ class BaseDatabasePolicy:
try:
store = get_connected_store(name, flavor)
except DisconnectionError:
-
# A request for a primary database connection was made
# and failed. Nothing we can do so reraise the exception.
if flavor != STANDBY_FLAVOR:
diff --git a/lib/lp/services/database/stormexpr.py b/lib/lp/services/database/stormexpr.py
index f9e808f..92b3ce0 100644
--- a/lib/lp/services/database/stormexpr.py
+++ b/lib/lp/services/database/stormexpr.py
@@ -184,14 +184,12 @@ class Array(ComparableExpr):
class TryAdvisoryLock(NamedFunc):
-
__slots__ = ()
name = "PG_TRY_ADVISORY_LOCK"
class AdvisoryUnlock(NamedFunc):
-
__slots__ = ()
name = "PG_ADVISORY_UNLOCK"
diff --git a/lib/lp/services/database/tests/test_bulk.py b/lib/lp/services/database/tests/test_bulk.py
index 09c9e03..6cdf569 100644
--- a/lib/lp/services/database/tests/test_bulk.py
+++ b/lib/lp/services/database/tests/test_bulk.py
@@ -69,7 +69,6 @@ class TestBasicFunctions(TestCase):
class TestLoaders(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_gen_reload_queries_with_empty_list(self):
@@ -277,7 +276,6 @@ class TestLoaders(TestCaseWithFactory):
class TestCreate(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_references_and_enums(self):
diff --git a/lib/lp/services/database/tests/test_collection.py b/lib/lp/services/database/tests/test_collection.py
index 35f967b..3db5f9a 100644
--- a/lib/lp/services/database/tests/test_collection.py
+++ b/lib/lp/services/database/tests/test_collection.py
@@ -54,7 +54,6 @@ def get_ids(testtable_objects):
class CollectionTest(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_make_table(self):
diff --git a/lib/lp/services/database/tests/test_isolation.py b/lib/lp/services/database/tests/test_isolation.py
index 629f450..90381b1 100644
--- a/lib/lp/services/database/tests/test_isolation.py
+++ b/lib/lp/services/database/tests/test_isolation.py
@@ -14,7 +14,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class TestIsolation(TestCase):
-
layer = LaunchpadZopelessLayer
def createTransaction(self):
diff --git a/lib/lp/services/database/tests/test_sqlbase.py b/lib/lp/services/database/tests/test_sqlbase.py
index dc88a38..8d79948 100644
--- a/lib/lp/services/database/tests/test_sqlbase.py
+++ b/lib/lp/services/database/tests/test_sqlbase.py
@@ -16,7 +16,6 @@ from lp.testing.layers import DatabaseLayer, ZopelessDatabaseLayer
class TestConnect(TestCase):
-
layer = ZopelessDatabaseLayer
@staticmethod
diff --git a/lib/lp/services/database/tests/test_stormbase.py b/lib/lp/services/database/tests/test_stormbase.py
index a6d369f..54239a7 100644
--- a/lib/lp/services/database/tests/test_stormbase.py
+++ b/lib/lp/services/database/tests/test_stormbase.py
@@ -19,7 +19,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class StormExample(StormBase):
-
__storm_table__ = "StormExample"
id = Int(primary=True)
@@ -32,7 +31,6 @@ class StormExample(StormBase):
class TestStormBase(TestCase):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/services/database/tests/test_stormexpr.py b/lib/lp/services/database/tests/test_stormexpr.py
index c8a803d..935df22 100644
--- a/lib/lp/services/database/tests/test_stormexpr.py
+++ b/lib/lp/services/database/tests/test_stormexpr.py
@@ -73,7 +73,6 @@ class TestWithMaterializedRealDatabase(TestCase):
class TestImmutablePgJSON(TestCase):
-
layer = BaseLayer
def setUpProperty(self, *args, **kwargs):
diff --git a/lib/lp/services/features/browser/changelog.py b/lib/lp/services/features/browser/changelog.py
index aef753e..7127965 100644
--- a/lib/lp/services/features/browser/changelog.py
+++ b/lib/lp/services/features/browser/changelog.py
@@ -13,7 +13,6 @@ from lp.services.webapp.publisher import LaunchpadView
class FeatureChangeLogView(LaunchpadView):
-
page_title = label = "Feature flag changelog"
@property
diff --git a/lib/lp/services/features/browser/tests/test_feature_editor.py b/lib/lp/services/features/browser/tests/test_feature_editor.py
index 130586a..1db5434 100644
--- a/lib/lp/services/features/browser/tests/test_feature_editor.py
+++ b/lib/lp/services/features/browser/tests/test_feature_editor.py
@@ -24,7 +24,6 @@ from lp.testing.pages import find_main_content, find_tag_by_id
class TestFeatureControlPage(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/features/browser/tests/test_feature_info.py b/lib/lp/services/features/browser/tests/test_feature_info.py
index 8a16ccd..65797cb 100644
--- a/lib/lp/services/features/browser/tests/test_feature_info.py
+++ b/lib/lp/services/features/browser/tests/test_feature_info.py
@@ -24,7 +24,6 @@ from lp.testing.matchers import Contains
class TestFeatureControlPage(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def getFeatureInfoUrl(self):
diff --git a/lib/lp/services/features/rulesource.py b/lib/lp/services/features/rulesource.py
index df1b804..9ceb869 100644
--- a/lib/lp/services/features/rulesource.py
+++ b/lib/lp/services/features/rulesource.py
@@ -47,7 +47,7 @@ class FeatureRuleSource:
in descending order by priority.
"""
d = {}
- for (flag, scope, priority, value) in self.getAllRulesAsTuples():
+ for flag, scope, priority, value in self.getAllRulesAsTuples():
d.setdefault(str(flag), []).append((str(scope), priority, value))
return d
@@ -63,7 +63,7 @@ class FeatureRuleSource:
interface.
"""
tr = []
- for (flag, scope, priority, value) in self.getAllRulesAsTuples():
+ for flag, scope, priority, value in self.getAllRulesAsTuples():
tr.append("\t".join((flag, scope, str(priority), value)))
tr.append("")
return "\n".join(tr)
@@ -135,7 +135,7 @@ class StormFeatureRuleSource(FeatureRuleSource):
# we keep timestamps, and to avoid the direct sql etc -- mbp 20100924
store = getFeatureStore()
store.execute("DELETE FROM FeatureFlag")
- for (flag, scope, priority, value) in new_rules:
+ for flag, scope, priority, value in new_rules:
store.add(
FeatureFlag(
scope=six.ensure_text(scope),
diff --git a/lib/lp/services/features/tests/test_db_settings.py b/lib/lp/services/features/tests/test_db_settings.py
index 859cd8a..6c6463a 100644
--- a/lib/lp/services/features/tests/test_db_settings.py
+++ b/lib/lp/services/features/tests/test_db_settings.py
@@ -8,7 +8,6 @@ from lp.testing import TestCase, layers
class TestFeatureModel(TestCase):
-
layer = layers.DatabaseFunctionalLayer
def test_defaultEmptyCollection(self):
diff --git a/lib/lp/services/features/tests/test_flags.py b/lib/lp/services/features/tests/test_flags.py
index 3d5c949..22bd200 100644
--- a/lib/lp/services/features/tests/test_flags.py
+++ b/lib/lp/services/features/tests/test_flags.py
@@ -25,7 +25,6 @@ testdata = [
class TestFeatureFlags(TestCase):
-
layer = layers.DatabaseFunctionalLayer
def setUp(self):
@@ -249,7 +248,6 @@ flag2 default 0\ton
class TestStormFeatureRuleSource(FeatureRuleSourceTestsMixin, TestCase):
-
layer = layers.DatabaseFunctionalLayer
def makeSource(self):
@@ -257,7 +255,6 @@ class TestStormFeatureRuleSource(FeatureRuleSourceTestsMixin, TestCase):
class TestMemoryFeatureRuleSource(FeatureRuleSourceTestsMixin, TestCase):
-
layer = layers.FunctionalLayer
def makeSource(self):
diff --git a/lib/lp/services/features/tests/test_scopes.py b/lib/lp/services/features/tests/test_scopes.py
index 824fbd4..d82849b 100644
--- a/lib/lp/services/features/tests/test_scopes.py
+++ b/lib/lp/services/features/tests/test_scopes.py
@@ -17,7 +17,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class FakeScope(BaseScope):
-
pattern = r"fake:"
def __init__(self, name):
@@ -28,7 +27,6 @@ class FakeScope(BaseScope):
class TestScopes(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_ScriptScope_lookup_matches_script_scope(self):
@@ -74,7 +72,6 @@ class TestScopes(TestCaseWithFactory):
class FakePerson:
-
id = 7
@@ -97,7 +94,6 @@ class TestUserSliceScope(TestCase):
class TestUserSliceScopeIntegration(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_user_slice_from_rules(self):
diff --git a/lib/lp/services/features/tests/test_webapp.py b/lib/lp/services/features/tests/test_webapp.py
index 37de309..119e218 100644
--- a/lib/lp/services/features/tests/test_webapp.py
+++ b/lib/lp/services/features/tests/test_webapp.py
@@ -17,7 +17,6 @@ from lp.testing import (
class TestScopesFromRequest(TestCase):
-
layer = layers.BaseLayer
def test_pageid_scope_normal(self):
@@ -60,7 +59,6 @@ class TestScopesFromRequest(TestCase):
class TestDBScopes(TestCaseWithFactory):
-
layer = layers.DatabaseFunctionalLayer
def test_team_scope_outside_team(self):
@@ -79,7 +77,6 @@ class TestDBScopes(TestCaseWithFactory):
class TestFeaturesIntoOops(TestCaseWithFactory):
-
layer = layers.DatabaseFunctionalLayer
def test_get_features_into_oops(self):
diff --git a/lib/lp/services/features/tests/test_xmlrpc.py b/lib/lp/services/features/tests/test_xmlrpc.py
index 3835e57..845b5a1 100644
--- a/lib/lp/services/features/tests/test_xmlrpc.py
+++ b/lib/lp/services/features/tests/test_xmlrpc.py
@@ -21,7 +21,6 @@ from lp.testing.xmlrpc import XMLRPCTestTransport
class TestGetFeatureFlag(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/fields/__init__.py b/lib/lp/services/fields/__init__.py
index 25dc239..13bbc6c 100644
--- a/lib/lp/services/fields/__init__.py
+++ b/lib/lp/services/fields/__init__.py
@@ -808,19 +808,16 @@ class BaseImageUpload(Bytes):
class IconImageUpload(BaseImageUpload):
-
dimensions = (14, 14)
max_size = 5 * 1024
class LogoImageUpload(BaseImageUpload):
-
dimensions = (64, 64)
max_size = 50 * 1024
class MugshotImageUpload(BaseImageUpload):
-
dimensions = (192, 192)
max_size = 100 * 1024
diff --git a/lib/lp/services/fields/tests/test_fields.py b/lib/lp/services/fields/tests/test_fields.py
index d0e550e..e31912e 100644
--- a/lib/lp/services/fields/tests/test_fields.py
+++ b/lib/lp/services/fields/tests/test_fields.py
@@ -100,7 +100,6 @@ class TestStrippableText(TestCase):
class TestWorkItemsTextValidation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -537,7 +536,6 @@ class TestWorkItemsText(TestCase):
class TestBlocklistableContentNameField(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/fields/tests/test_tag_fields.py b/lib/lp/services/fields/tests/test_tag_fields.py
index 5df932f..a706d4d 100644
--- a/lib/lp/services/fields/tests/test_tag_fields.py
+++ b/lib/lp/services/fields/tests/test_tag_fields.py
@@ -11,7 +11,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestTag(TestCase):
-
layer = LaunchpadFunctionalLayer
field = Tag()
@@ -59,7 +58,6 @@ class TestTag(TestCase):
class TestSearchTag(TestTag):
-
field = SearchTag()
def test_negated_search_form(self):
diff --git a/lib/lp/services/identity/interfaces/account.py b/lib/lp/services/identity/interfaces/account.py
index 17ea7c6..eaff4a7 100644
--- a/lib/lp/services/identity/interfaces/account.py
+++ b/lib/lp/services/identity/interfaces/account.py
@@ -427,7 +427,6 @@ class IAccountViewRestricted(Interface):
class IAccountModerateRestricted(Interface):
-
status_history = Text(
title=_("Account status comments"), required=False, readonly=True
)
diff --git a/lib/lp/services/identity/model/emailaddress.py b/lib/lp/services/identity/model/emailaddress.py
index d918b83..c80f10e 100644
--- a/lib/lp/services/identity/model/emailaddress.py
+++ b/lib/lp/services/identity/model/emailaddress.py
@@ -42,7 +42,6 @@ class HasOwnerMixin:
@implementer(IEmailAddress)
class EmailAddress(SQLBase, HasOwnerMixin):
-
_table = "EmailAddress"
_defaultOrder = ["email"]
diff --git a/lib/lp/services/identity/tests/test_account.py b/lib/lp/services/identity/tests/test_account.py
index 6a4b10c..a73aca6 100644
--- a/lib/lp/services/identity/tests/test_account.py
+++ b/lib/lp/services/identity/tests/test_account.py
@@ -15,7 +15,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestAccount(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_account_repr_ansii(self):
diff --git a/lib/lp/services/job/interfaces/job.py b/lib/lp/services/job/interfaces/job.py
index 86736f1..079e2d5 100644
--- a/lib/lp/services/job/interfaces/job.py
+++ b/lib/lp/services/job/interfaces/job.py
@@ -71,7 +71,6 @@ class JobStatus(DBEnumeratedType):
class JobType(DBEnumeratedType):
-
GENERATE_PACKAGE_DIFF = DBItem(
0,
"""
diff --git a/lib/lp/services/job/runner.py b/lib/lp/services/job/runner.py
index 7210027..9b8f1cf 100644
--- a/lib/lp/services/job/runner.py
+++ b/lib/lp/services/job/runner.py
@@ -454,7 +454,6 @@ class JobRunner(BaseJobRunner):
class RunJobCommand(amp.Command):
-
arguments = [(b"job_id", amp.Integer())]
response = [(b"success", amp.Integer()), (b"oops_id", amp.Unicode())]
diff --git a/lib/lp/services/job/tests/test_celery.py b/lib/lp/services/job/tests/test_celery.py
index effbc90..2490962 100644
--- a/lib/lp/services/job/tests/test_celery.py
+++ b/lib/lp/services/job/tests/test_celery.py
@@ -244,7 +244,6 @@ class TestTimeoutJob(TestJob):
class TestCeleryLaneFallback(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_fallback_to_slow_lane(self):
diff --git a/lib/lp/services/job/tests/test_celeryjob.py b/lib/lp/services/job/tests/test_celeryjob.py
index ed807e8..5e7d199 100644
--- a/lib/lp/services/job/tests/test_celeryjob.py
+++ b/lib/lp/services/job/tests/test_celeryjob.py
@@ -23,7 +23,6 @@ from lp.testing.layers import ZopelessAppServerLayer
class TestRunMissingJobs(TestCaseWithFactory):
-
layer = ZopelessAppServerLayer
def setUp(self):
diff --git a/lib/lp/services/job/tests/test_job.py b/lib/lp/services/job/tests/test_job.py
index 900daaf..799ad98 100644
--- a/lib/lp/services/job/tests/test_job.py
+++ b/lib/lp/services/job/tests/test_job.py
@@ -468,7 +468,6 @@ class TestReadiness(TestCase):
class TestUniversalJobSource(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_get_with_merge_proposal_job(self):
diff --git a/lib/lp/services/job/tests/test_runner.py b/lib/lp/services/job/tests/test_runner.py
index 071f2ee..f443435 100644
--- a/lib/lp/services/job/tests/test_runner.py
+++ b/lib/lp/services/job/tests/test_runner.py
@@ -136,7 +136,6 @@ class RetryError(Exception):
class RaisingRetryJob(NullJob):
-
retry_error_types = (RetryError,)
max_retries = 1
@@ -647,7 +646,6 @@ class ShorterStuckJob(StuckJob):
@implementer(IRunnableJob)
class InitialFailureJob(StaticJobSource):
-
jobs = [(True,), (False,)]
has_failed = False
@@ -670,7 +668,6 @@ class InitialFailureJob(StaticJobSource):
@implementer(IRunnableJob)
class ProcessSharingJob(StaticJobSource):
-
jobs = [(True,), (False,)]
initial_job_was_here = False
@@ -692,7 +689,6 @@ class ProcessSharingJob(StaticJobSource):
@implementer(IRunnableJob)
class MemoryHogJob(StaticJobSource):
-
jobs = [()]
done = False
@@ -708,7 +704,6 @@ class MemoryHogJob(StaticJobSource):
class NoJobs(StaticJobSource):
-
done = False
jobs = []
@@ -716,7 +711,6 @@ class NoJobs(StaticJobSource):
@implementer(IRunnableJob)
class LeaseHeldJob(StaticJobSource):
-
jobs = [()]
done = False
@@ -730,7 +724,6 @@ class LeaseHeldJob(StaticJobSource):
class TestTwistedJobRunner(TestCaseWithFactory):
-
# Needs AMQP
layer = LaunchpadZopelessLayer
run_tests_with = RunIsolatedTest
@@ -898,7 +891,6 @@ class TestTwistedJobRunner(TestCaseWithFactory):
class TestCeleryEnabled(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_no_flag(self):
diff --git a/lib/lp/services/librarian/tests/fakeserver.tac b/lib/lp/services/librarian/tests/fakeserver.tac
index fcd0089..593ca7f 100644
--- a/lib/lp/services/librarian/tests/fakeserver.tac
+++ b/lib/lp/services/librarian/tests/fakeserver.tac
@@ -12,7 +12,6 @@ from lp.services.daemons import readyservice
class FakeResource(resource.Resource):
-
isLeaf = True
def render_GET(self, request):
diff --git a/lib/lp/services/librarian/tests/test_timelimitedtoken.py b/lib/lp/services/librarian/tests/test_timelimitedtoken.py
index 68aa1bb..d593cfd 100644
--- a/lib/lp/services/librarian/tests/test_timelimitedtoken.py
+++ b/lib/lp/services/librarian/tests/test_timelimitedtoken.py
@@ -11,7 +11,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestLibraryFileAlias(testtools.TestCase):
-
layer = LaunchpadFunctionalLayer
def test_allocate(self):
diff --git a/lib/lp/services/librarian/tests/test_utils.py b/lib/lp/services/librarian/tests/test_utils.py
index a97d42c..0ba525b 100644
--- a/lib/lp/services/librarian/tests/test_utils.py
+++ b/lib/lp/services/librarian/tests/test_utils.py
@@ -50,7 +50,6 @@ class LibrarianUtils(TestCase):
class TestEncodableLibraryFileAlias(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_read_all(self):
diff --git a/lib/lp/services/librarianserver/librariangc.py b/lib/lp/services/librarianserver/librariangc.py
index a810c5f..7790971 100644
--- a/lib/lp/services/librarianserver/librariangc.py
+++ b/lib/lp/services/librarianserver/librariangc.py
@@ -726,7 +726,6 @@ def delete_unwanted_disk_files(con):
for dirpath, dirnames, filenames in os.walk(
get_storage_root(), followlinks=True
):
-
# Ignore known and harmless noise in the Librarian storage area.
if "incoming" in dirnames:
dirnames.remove("incoming")
@@ -777,7 +776,6 @@ def delete_unwanted_disk_files(con):
next_wanted_content_id is not None
and content_id > next_wanted_content_id
):
-
next_wanted_content_id = get_next_wanted_content_id()
if (
@@ -930,7 +928,6 @@ def delete_unwanted_swift_files(con):
next_wanted_content_id is not None
and content_id > next_wanted_content_id
):
-
next_wanted_content_id = get_next_wanted_content_id()
if (
diff --git a/lib/lp/services/librarianserver/swift.py b/lib/lp/services/librarianserver/swift.py
index c7da839..acd55e2 100644
--- a/lib/lp/services/librarianserver/swift.py
+++ b/lib/lp/services/librarianserver/swift.py
@@ -99,7 +99,6 @@ def to_swift(
# files that may need to be copied into Swift. We need to follow
# symlinks as they are being used span disk partitions.
for dirpath, dirnames, filenames in os.walk(fs_root, followlinks=True):
-
# Don't recurse if we know this directory contains no matching
# files.
if (
diff --git a/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py b/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py
index ac61092..3fcae6a 100644
--- a/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py
+++ b/lib/lp/services/librarianserver/testing/tests/test_server_fixture.py
@@ -16,7 +16,6 @@ from lp.testing.layers import BaseLayer, DatabaseLayer
class TestLibrarianServerFixture(TestCase):
-
layer = DatabaseLayer
def skip_if_persistent(self, fixture):
diff --git a/lib/lp/services/librarianserver/tests/test_db.py b/lib/lp/services/librarianserver/tests/test_db.py
index d892613..f43d918 100644
--- a/lib/lp/services/librarianserver/tests/test_db.py
+++ b/lib/lp/services/librarianserver/tests/test_db.py
@@ -63,7 +63,6 @@ class DBTestCase(TestCase):
@implementer(IMacaroonIssuer)
class FakeMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "test"
_root_secret = "test"
_verified_user = NO_USER
diff --git a/lib/lp/services/librarianserver/tests/test_sigdumpmem.py b/lib/lp/services/librarianserver/tests/test_sigdumpmem.py
index d310c0d..6434dc3 100644
--- a/lib/lp/services/librarianserver/tests/test_sigdumpmem.py
+++ b/lib/lp/services/librarianserver/tests/test_sigdumpmem.py
@@ -12,7 +12,6 @@ from lp.testing.layers import LibrarianLayer
class SIGDUMPMEMTestCase(TestCase):
-
layer = LibrarianLayer
def test_sigdumpmem(self):
diff --git a/lib/lp/services/librarianserver/tests/test_storage_db.py b/lib/lp/services/librarianserver/tests/test_storage_db.py
index 44c6a39..b2d0b1b 100644
--- a/lib/lp/services/librarianserver/tests/test_storage_db.py
+++ b/lib/lp/services/librarianserver/tests/test_storage_db.py
@@ -141,7 +141,6 @@ class LibrarianStorageDBTests(TestCase):
class LibrarianStorageSwiftTests(TestCase):
-
layer = LaunchpadZopelessLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
diff --git a/lib/lp/services/librarianserver/tests/test_web.py b/lib/lp/services/librarianserver/tests/test_web.py
index 5747f9e..a84b74d 100644
--- a/lib/lp/services/librarianserver/tests/test_web.py
+++ b/lib/lp/services/librarianserver/tests/test_web.py
@@ -53,7 +53,6 @@ def uri_path_replace(url, old, new):
class LibrarianWebTestMixin:
-
layer = LaunchpadFunctionalLayer
def commit(self):
@@ -91,7 +90,6 @@ class LibrarianWebTestMixin:
class LibrarianZopelessWebTestMixin(LibrarianWebTestMixin):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -513,7 +511,6 @@ class LibrarianZopelessWebTestCase(
class LibrarianWebMacaroonTestCase(LibrarianWebTestMixin, TestCaseWithFactory):
-
layer = AppServerLayer
def setUp(self):
@@ -576,12 +573,10 @@ class LibrarianWebMacaroonTestCase(LibrarianWebTestMixin, TestCaseWithFactory):
class LibrarianZopelessWebMacaroonTestCase(
LibrarianZopelessWebTestMixin, LibrarianWebMacaroonTestCase
):
-
layer = ZopelessAppServerLayer
class DeletedContentTestCase(unittest.TestCase):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/services/librarianserver/web.py b/lib/lp/services/librarianserver/web.py
index 23f6555..ef9b6eb 100644
--- a/lib/lp/services/librarianserver/web.py
+++ b/lib/lp/services/librarianserver/web.py
@@ -266,7 +266,6 @@ class File(resource.Resource):
@implementer(IPushProducer)
class FileProducer:
-
buffer_size = abstract.FileDescriptor.bufferSize
def __init__(self, request, stream):
diff --git a/lib/lp/services/looptuner.py b/lib/lp/services/looptuner.py
index c6cecb0..91ce581 100644
--- a/lib/lp/services/looptuner.py
+++ b/lib/lp/services/looptuner.py
@@ -163,7 +163,6 @@ class LoopTuner:
self.start_time = self._time()
last_clock = self.start_time
while not self.operation.isDone():
-
if self._isTimedOut():
self.log.info(
"Task aborted after %d seconds.", self.abort_time
diff --git a/lib/lp/services/mail/incoming.py b/lib/lp/services/mail/incoming.py
index 9f2c990..57cca35 100644
--- a/lib/lp/services/mail/incoming.py
+++ b/lib/lp/services/mail/incoming.py
@@ -424,7 +424,6 @@ def report_oops(file_alias_url=None, error_msg=None):
def handleMail(trans=transaction, signature_timestamp_checker=None):
-
log = logging.getLogger("process-mail")
mailbox = getUtility(IMailBox)
log.info("Opening the mail box.")
diff --git a/lib/lp/services/mail/tests/test_basemailer.py b/lib/lp/services/mail/tests/test_basemailer.py
index 5bb60e5..6b9df8e 100644
--- a/lib/lp/services/mail/tests/test_basemailer.py
+++ b/lib/lp/services/mail/tests/test_basemailer.py
@@ -84,7 +84,6 @@ class RaisingMailControllerFactory:
class TestBaseMailer(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_generateEmail_sets_envelope_to(self):
diff --git a/lib/lp/services/mail/tests/test_helpers.py b/lib/lp/services/mail/tests/test_helpers.py
index c819a87..e1dd689 100644
--- a/lib/lp/services/mail/tests/test_helpers.py
+++ b/lib/lp/services/mail/tests/test_helpers.py
@@ -279,7 +279,6 @@ class TestGetPersonOrTeam(TestCaseWithFactory):
class Testget_contact_email_addresses(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_person_with_hidden_email(self):
diff --git a/lib/lp/services/mail/tests/test_incoming.py b/lib/lp/services/mail/tests/test_incoming.py
index 3925782..9eff2a5 100644
--- a/lib/lp/services/mail/tests/test_incoming.py
+++ b/lib/lp/services/mail/tests/test_incoming.py
@@ -79,7 +79,6 @@ class FakeGPGHandlerNotFound:
class IncomingTestCase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_invalid_signature(self):
@@ -343,7 +342,6 @@ class IncomingTestCase(TestCaseWithFactory):
class AuthenticateEmailTestCase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_bad_signature_timestamp(self):
@@ -382,7 +380,6 @@ class AuthenticateEmailTestCase(TestCaseWithFactory):
class TestExtractAddresses(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_original_to(self):
diff --git a/lib/lp/services/mail/tests/test_notificationrecipients.py b/lib/lp/services/mail/tests/test_notificationrecipients.py
index 8892a37..85f933d 100644
--- a/lib/lp/services/mail/tests/test_notificationrecipients.py
+++ b/lib/lp/services/mail/tests/test_notificationrecipients.py
@@ -12,7 +12,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestNotificationRecipientSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_add_doesnt_break_on_private_teams(self):
diff --git a/lib/lp/services/memcache/tests/test_memcache_client.py b/lib/lp/services/memcache/tests/test_memcache_client.py
index 1705d47..7a43090 100644
--- a/lib/lp/services/memcache/tests/test_memcache_client.py
+++ b/lib/lp/services/memcache/tests/test_memcache_client.py
@@ -19,7 +19,6 @@ from lp.testing.layers import LaunchpadZopelessLayer
class MemcacheClientTestCase(TestCase):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -130,7 +129,6 @@ class MemcacheClientTestCase(TestCase):
class MemcacheClientFactoryTestCase(TestCase):
-
layer = LaunchpadZopelessLayer
def test_with_timeline(self):
diff --git a/lib/lp/services/messages/model/message.py b/lib/lp/services/messages/model/message.py
index 38c157f..8f4cc26 100644
--- a/lib/lp/services/messages/model/message.py
+++ b/lib/lp/services/messages/model/message.py
@@ -288,7 +288,6 @@ def get_parent_msgids(parsed_message):
@implementer(IMessageSet)
class MessageSet:
-
extra_encoding_aliases = {
"macintosh": "mac_roman",
}
@@ -551,7 +550,6 @@ class MessageSet:
and no_attachment
and part.get_filename() is None
):
-
# Get the charset for the message part. If one isn't
# specified, default to latin-1 to prevent
# UnicodeDecodeErrors.
diff --git a/lib/lp/services/messages/tests/scenarios.py b/lib/lp/services/messages/tests/scenarios.py
index 130a81d..312e0e6 100644
--- a/lib/lp/services/messages/tests/scenarios.py
+++ b/lib/lp/services/messages/tests/scenarios.py
@@ -10,7 +10,6 @@ from lp.testing import login_person
class MessageTypeScenariosMixin(WithScenarios):
-
scenarios = [
("bug", {"message_type": "bug"}),
("question", {"message_type": "question"}),
diff --git a/lib/lp/services/messages/tests/test_yuitests.py b/lib/lp/services/messages/tests/test_yuitests.py
index 0219264..9faf690 100644
--- a/lib/lp/services/messages/tests/test_yuitests.py
+++ b/lib/lp/services/messages/tests/test_yuitests.py
@@ -10,7 +10,6 @@ from lp.testing.layers import YUITestLayer
class MessagesYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "MessagesYUIUnitTests"
diff --git a/lib/lp/services/oauth/tests/test_tokens.py b/lib/lp/services/oauth/tests/test_tokens.py
index 9fb405d..ab69dcb 100644
--- a/lib/lp/services/oauth/tests/test_tokens.py
+++ b/lib/lp/services/oauth/tests/test_tokens.py
@@ -34,7 +34,6 @@ from lp.testing.mail_helpers import pop_notifications
class TestOAuth(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/openid/extensions/tests/test_macaroon.py b/lib/lp/services/openid/extensions/tests/test_macaroon.py
index f519275..1e9d44e 100644
--- a/lib/lp/services/openid/extensions/tests/test_macaroon.py
+++ b/lib/lp/services/openid/extensions/tests/test_macaroon.py
@@ -20,7 +20,6 @@ from lp.testopenid.interfaces.server import get_server_url
class TestGetMacaroonNS(TestCase):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -50,7 +49,6 @@ class TestGetMacaroonNS(TestCase):
class TestMacaroonRequest(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -109,7 +107,6 @@ class TestMacaroonRequest(TestCaseWithFactory):
class TestMacaroonResponse(TestCase):
-
layer = ZopelessDatabaseLayer
def test_init(self):
diff --git a/lib/lp/services/openid/tests/test_openid_adapters.py b/lib/lp/services/openid/tests/test_openid_adapters.py
index 24f3dd7..40f5f21 100644
--- a/lib/lp/services/openid/tests/test_openid_adapters.py
+++ b/lib/lp/services/openid/tests/test_openid_adapters.py
@@ -10,7 +10,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class OpenIdAdapterTests(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def set_launchpad_section_setings(self, **kwargs):
diff --git a/lib/lp/services/profile/profile.py b/lib/lp/services/profile/profile.py
index 7668c3f..8d22f5b 100644
--- a/lib/lp/services/profile/profile.py
+++ b/lib/lp/services/profile/profile.py
@@ -43,7 +43,6 @@ class ProfilingOops(Exception):
class Profiler:
-
profiler_lock = threading.Lock()
"""Global lock used to serialise profiles."""
@@ -102,7 +101,6 @@ class Profiler:
class Stats:
-
_callgrind_stats = None
def __init__(self, stats, rawstats, count):
@@ -500,7 +498,7 @@ def end_request(event):
triggers.items(), key=lambda x: len(x[1]), reverse=True
)
top_triggers = []
- for (key, ixs) in triggers:
+ for key, ixs in triggers:
if len(ixs) == 1:
break
info = trace[ixs[0] - 1]["app_stack"][-1].copy()
diff --git a/lib/lp/services/profile/tests.py b/lib/lp/services/profile/tests.py
index 2dabf32..0b9019f 100644
--- a/lib/lp/services/profile/tests.py
+++ b/lib/lp/services/profile/tests.py
@@ -712,7 +712,6 @@ class TestOOPSRequestEndHandler(BaseRequestEndHandlerTest):
class TestBeforeTraverseHandler(TestCleanupProfiler):
-
layer = layers.DatabaseFunctionalLayer
def test_can_enable_profiling_over_config(self):
@@ -786,7 +785,6 @@ class TestInlineProfiling(BaseRequestEndHandlerTest):
class TestSqlLogging(TestCaseWithFactory, BaseRequestEndHandlerTest):
-
layer = layers.DatabaseFunctionalLayer
def testLogging(self):
diff --git a/lib/lp/services/rabbit/tests/test_server.py b/lib/lp/services/rabbit/tests/test_server.py
index 4afc670..ec200d2 100644
--- a/lib/lp/services/rabbit/tests/test_server.py
+++ b/lib/lp/services/rabbit/tests/test_server.py
@@ -14,7 +14,6 @@ from lp.testing.layers import BaseLayer
class TestRabbitServer(TestCase):
-
layer = BaseLayer
def test_service_config(self):
diff --git a/lib/lp/services/scripts/model/scriptactivity.py b/lib/lp/services/scripts/model/scriptactivity.py
index 87602e7..5962fa8 100644
--- a/lib/lp/services/scripts/model/scriptactivity.py
+++ b/lib/lp/services/scripts/model/scriptactivity.py
@@ -24,7 +24,6 @@ from lp.services.scripts.metrics import emit_script_activity_metric
@implementer(IScriptActivity)
class ScriptActivity(StormBase):
-
__storm_table__ = "ScriptActivity"
id = Int(primary=True)
diff --git a/lib/lp/services/signing/enums.py b/lib/lp/services/signing/enums.py
index 74f9ef2..5b92308 100644
--- a/lib/lp/services/signing/enums.py
+++ b/lib/lp/services/signing/enums.py
@@ -94,7 +94,6 @@ class SigningKeyType(DBEnumeratedType):
class OpenPGPKeyAlgorithm(EnumeratedType):
-
RSA = Item(
"""
RSA
diff --git a/lib/lp/services/signing/testing/fixture.py b/lib/lp/services/signing/testing/fixture.py
index 9d617b5..e84af2c 100644
--- a/lib/lp/services/signing/testing/fixture.py
+++ b/lib/lp/services/signing/testing/fixture.py
@@ -22,7 +22,6 @@ from lp.testing.factory import ObjectFactory
class SigningServiceFixture(TacTestFixture):
-
tacfile = os.path.join(os.path.dirname(__file__), "fakesigning.tac")
pidfile = None
logfile = None
diff --git a/lib/lp/services/signing/tests/test_signingkey.py b/lib/lp/services/signing/tests/test_signingkey.py
index 7b1d985..02185dd 100644
--- a/lib/lp/services/signing/tests/test_signingkey.py
+++ b/lib/lp/services/signing/tests/test_signingkey.py
@@ -33,7 +33,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestSigningKey(TestCaseWithFactory, TestWithFixtures):
-
layer = ZopelessDatabaseLayer
def setUp(self, *args, **kwargs):
diff --git a/lib/lp/services/statsd/tests/test_numbercruncher.py b/lib/lp/services/statsd/tests/test_numbercruncher.py
index 9db157f..6f6ab3c 100644
--- a/lib/lp/services/statsd/tests/test_numbercruncher.py
+++ b/lib/lp/services/statsd/tests/test_numbercruncher.py
@@ -32,7 +32,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestNumberCruncher(StatsMixin, TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=20)
diff --git a/lib/lp/services/statsd/tests/test_statsd_client.py b/lib/lp/services/statsd/tests/test_statsd_client.py
index cb46ab9..82eb1fa 100644
--- a/lib/lp/services/statsd/tests/test_statsd_client.py
+++ b/lib/lp/services/statsd/tests/test_statsd_client.py
@@ -13,7 +13,6 @@ from lp.testing.layers import ZopelessLayer
class TestClientConfiguration(TestCase):
-
layer = ZopelessLayer
def test_accessible_via_utility(self):
diff --git a/lib/lp/services/testing/tests/test_customresult.py b/lib/lp/services/testing/tests/test_customresult.py
index 39573f0..378da0a 100644
--- a/lib/lp/services/testing/tests/test_customresult.py
+++ b/lib/lp/services/testing/tests/test_customresult.py
@@ -29,7 +29,6 @@ class FakeTestCase(unittest.TestCase):
class TestFilterTests(TestCase):
-
layer = BaseLayer
def writeFile(self, f, contents):
diff --git a/lib/lp/services/tests/test_channels.py b/lib/lp/services/tests/test_channels.py
index ab78cc1..473bc1f 100644
--- a/lib/lp/services/tests/test_channels.py
+++ b/lib/lp/services/tests/test_channels.py
@@ -9,7 +9,6 @@ from lp.testing.layers import BaseLayer
class TestChannels(TestCase):
-
layer = BaseLayer
def test_channel_string_to_list_no_track_or_branch(self):
diff --git a/lib/lp/services/tests/test_stacktrace.py b/lib/lp/services/tests/test_stacktrace.py
index 16afb60..6c10852 100644
--- a/lib/lp/services/tests/test_stacktrace.py
+++ b/lib/lp/services/tests/test_stacktrace.py
@@ -59,7 +59,6 @@ class BadString:
class TestStacktrace(TestCase):
-
layer = BaseLayer
def test_get_frame_helper(self):
diff --git a/lib/lp/services/tests/test_utils.py b/lib/lp/services/tests/test_utils.py
index 564ce5d..41d5971 100644
--- a/lib/lp/services/tests/test_utils.py
+++ b/lib/lp/services/tests/test_utils.py
@@ -57,7 +57,6 @@ class TestAutoDecorateMetaClass(TestCase):
# All of the decorators passed along with AutoDecorateMetaClass
# are applied as decorators in reverse order.
class AutoDecoratedClass(metaclass=AutoDecorateMetaClass):
-
__decorators = (self.decorator_1, self.decorator_2)
def method_a(s):
diff --git a/lib/lp/services/timeline/tests/test_requesttimeline.py b/lib/lp/services/timeline/tests/test_requesttimeline.py
index a49ba8a..72070b7 100644
--- a/lib/lp/services/timeline/tests/test_requesttimeline.py
+++ b/lib/lp/services/timeline/tests/test_requesttimeline.py
@@ -16,7 +16,6 @@ from lp.services.timeline.requesttimeline import (
class TestRequestTimeline(testtools.TestCase):
-
# These disabled tests are for the desired API using request annotations.
# bug=623199 describes some issues with why this doesn't work.
def disabled_test_new_request_get_request_timeline_works(self):
diff --git a/lib/lp/services/verification/browser/logintoken.py b/lib/lp/services/verification/browser/logintoken.py
index 59cfbf0..8cb3b0c 100644
--- a/lib/lp/services/verification/browser/logintoken.py
+++ b/lib/lp/services/verification/browser/logintoken.py
@@ -58,7 +58,6 @@ from lp.services.webapp.vhosts import allvhosts
class LoginTokenSetNavigation(GetitemNavigation):
-
usedfor = ILoginTokenSet
@@ -167,7 +166,6 @@ class BaseTokenView:
class ClaimTeamView(
BaseTokenView, HasRenewalPolicyMixin, LaunchpadEditFormView
):
-
schema = ITeam
field_names = [
"teamowner",
@@ -243,7 +241,6 @@ class ClaimTeamView(
class ValidateGPGKeyView(BaseTokenView, LaunchpadFormView):
-
schema = IGPGKeyValidationForm
field_names = []
expected_token_types = (
@@ -408,7 +405,6 @@ class ValidateGPGKeyView(BaseTokenView, LaunchpadFormView):
class ValidateEmailView(BaseTokenView, LaunchpadFormView):
-
schema = Interface
field_names = []
expected_token_types = (LoginTokenType.VALIDATEEMAIL,)
@@ -511,7 +507,6 @@ class ValidateEmailView(BaseTokenView, LaunchpadFormView):
class ValidateTeamEmailView(ValidateEmailView):
-
expected_token_types = (LoginTokenType.VALIDATETEAMEMAIL,)
# The desired label is the same as ValidateEmailView.
@@ -521,7 +516,6 @@ class ValidateTeamEmailView(ValidateEmailView):
class MergePeopleView(BaseTokenView, LaunchpadFormView):
-
schema = Interface
field_names = []
expected_token_types = (LoginTokenType.ACCOUNTMERGE,)
diff --git a/lib/lp/services/verification/tests/test_logintoken.py b/lib/lp/services/verification/tests/test_logintoken.py
index cd70cb3..b93ab03 100644
--- a/lib/lp/services/verification/tests/test_logintoken.py
+++ b/lib/lp/services/verification/tests/test_logintoken.py
@@ -17,7 +17,6 @@ from lp.testing.mail_helpers import pop_notifications
class TestLoginToken(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_sendMergeRequestEmail(self):
diff --git a/lib/lp/services/webapp/adapter.py b/lib/lp/services/webapp/adapter.py
index a9910a5..755d7d7 100644
--- a/lib/lp/services/webapp/adapter.py
+++ b/lib/lp/services/webapp/adapter.py
@@ -500,7 +500,6 @@ class LaunchpadDatabase(Postgres):
class LaunchpadSessionDatabase(Postgres):
-
# A unique name for this database connection.
name = "session"
diff --git a/lib/lp/services/webapp/candid.py b/lib/lp/services/webapp/candid.py
index 2b73aa6..c512c7e 100644
--- a/lib/lp/services/webapp/candid.py
+++ b/lib/lp/services/webapp/candid.py
@@ -184,7 +184,6 @@ def request_candid_discharge(
class CandidErrorView(LaunchpadView):
-
page_title = "Authorization error"
template = ViewPageTemplateFile("templates/candid-error.pt")
diff --git a/lib/lp/services/webapp/error.py b/lib/lp/services/webapp/error.py
index ddb9eab..4c451f9 100644
--- a/lib/lp/services/webapp/error.py
+++ b/lib/lp/services/webapp/error.py
@@ -182,12 +182,10 @@ class ProtocolErrorView(SystemErrorView):
class UnexpectedFormDataView(SystemErrorView):
-
page_title = "Error: Unexpected form data"
class NotFoundView(SystemErrorView):
-
page_title = "Error: Page not found"
response_code = http.client.NOT_FOUND
@@ -225,7 +223,6 @@ class GoneView(NotFoundView):
class RequestExpiredView(SystemErrorView):
-
page_title = "Error: Timeout"
response_code = http.client.SERVICE_UNAVAILABLE
@@ -258,7 +255,6 @@ class InvalidBatchSizeView(SystemErrorView):
class TranslationUnavailableView(SystemErrorView):
-
page_title = "Error: Translation page is not available"
response_code = http.client.SERVICE_UNAVAILABLE
@@ -274,7 +270,6 @@ class NoReferrerErrorView(SystemErrorView):
class OpenIdDiscoveryFailureView(SystemErrorView):
-
response_code = http.client.SERVICE_UNAVAILABLE
def isSystemError(self):
@@ -283,11 +278,9 @@ class OpenIdDiscoveryFailureView(SystemErrorView):
class DisconnectionErrorView(SystemErrorView):
-
response_code = http.client.SERVICE_UNAVAILABLE
reason = "our database being temporarily offline"
class OperationalErrorView(DisconnectionErrorView):
-
reason = "our database having temporary operational issues"
diff --git a/lib/lp/services/webapp/errorlog.py b/lib/lp/services/webapp/errorlog.py
index 2cd45c5..f2cb950 100644
--- a/lib/lp/services/webapp/errorlog.py
+++ b/lib/lp/services/webapp/errorlog.py
@@ -253,7 +253,6 @@ def _get_type(report):
@implementer(IErrorReportingUtility)
class ErrorReportingUtility:
-
_ignored_exceptions = {"TranslationUnavailable", "NoReferrerError"}
_ignored_exceptions_for_offsite_referer = {
"GoneError",
@@ -477,7 +476,6 @@ globalErrorUtility = ErrorReportingUtility()
@implementer(IErrorReportRequest)
class ErrorReportRequest:
-
oopsid = None
diff --git a/lib/lp/services/webapp/interfaces.py b/lib/lp/services/webapp/interfaces.py
index ad0a103..ad9f30e 100644
--- a/lib/lp/services/webapp/interfaces.py
+++ b/lib/lp/services/webapp/interfaces.py
@@ -684,7 +684,6 @@ class INotification(Interface):
class INotificationList(Interface):
-
created = Datetime(title=_("Time this notification was created"))
def append(notification):
@@ -700,7 +699,6 @@ class INotificationList(Interface):
class INotificationRequest(Interface):
-
notifications = Object(
description="""
Notifications received from previous request as well as any
diff --git a/lib/lp/services/webapp/launchbag.py b/lib/lp/services/webapp/launchbag.py
index 34118a3..fc24e0c 100644
--- a/lib/lp/services/webapp/launchbag.py
+++ b/lib/lp/services/webapp/launchbag.py
@@ -33,7 +33,6 @@ from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries
@implementer(IOpenLaunchBag)
class LaunchBag:
-
# Map Interface to attribute name.
_registry = {
IPerson: "person",
diff --git a/lib/lp/services/webapp/login.py b/lib/lp/services/webapp/login.py
index 975c538..4f6314d 100644
--- a/lib/lp/services/webapp/login.py
+++ b/lib/lp/services/webapp/login.py
@@ -52,7 +52,6 @@ from lp.services.webapp.vhosts import allvhosts
class UnauthorizedView(SystemErrorView):
-
response_code = None
page_title = "Forbidden"
@@ -468,7 +467,6 @@ class OpenIDCallbackView(OpenIDLogin):
class OpenIDLoginErrorView(LaunchpadView):
-
page_title = "Error logging in"
template = ViewPageTemplateFile("templates/login-error.pt")
@@ -491,7 +489,6 @@ class OpenIDLoginErrorView(LaunchpadView):
class AlreadyLoggedInView(LaunchpadView):
-
page_title = "Already logged in"
template = ViewPageTemplateFile("templates/login-already.pt")
diff --git a/lib/lp/services/webapp/metazcml.py b/lib/lp/services/webapp/metazcml.py
index cae26d3..f47d3e2 100644
--- a/lib/lp/services/webapp/metazcml.py
+++ b/lib/lp/services/webapp/metazcml.py
@@ -230,7 +230,6 @@ class IFeedsDirective(IGlueDirective):
class IFaviconDirective(Interface):
-
for_ = GlobalObject(
title="Specification of the object that has this favicon",
required=True,
@@ -375,7 +374,6 @@ class TALESContextForInterfaceInstance:
# provide an 'inside' property.
@implementer(ICanonicalUrlData)
class CanonicalUrlDataBase:
-
# Filled in by subclass.
_for = None
_compiled_path_expression = None
@@ -686,7 +684,6 @@ def call(_context, callable):
class IDefineLaunchpadPermissionDirective(IPermissionDirective):
-
access_level = TextLine(
title="Access level",
required=False,
@@ -695,7 +692,6 @@ class IDefineLaunchpadPermissionDirective(IPermissionDirective):
class ILaunchpadPermission(IPermission):
-
access_level = IDefineLaunchpadPermissionDirective["access_level"]
diff --git a/lib/lp/services/webapp/notifications.py b/lib/lp/services/webapp/notifications.py
index 399da1a..3701142 100644
--- a/lib/lp/services/webapp/notifications.py
+++ b/lib/lp/services/webapp/notifications.py
@@ -164,7 +164,6 @@ class NotificationList(list):
@implementer(INotification)
class Notification:
-
level = None
message = None
diff --git a/lib/lp/services/webapp/pgsession.py b/lib/lp/services/webapp/pgsession.py
index 1f25642..b8582fb 100644
--- a/lib/lp/services/webapp/pgsession.py
+++ b/lib/lp/services/webapp/pgsession.py
@@ -106,7 +106,6 @@ class PGSessionDataContainer(PGSessionBase):
@implementer(ISessionData)
class PGSessionData(PGSessionBase):
-
session_data_container = None
_have_ensured_client_id = False
diff --git a/lib/lp/services/webapp/servers.py b/lib/lp/services/webapp/servers.py
index 602f0c5..ffed710 100644
--- a/lib/lp/services/webapp/servers.py
+++ b/lib/lp/services/webapp/servers.py
@@ -313,7 +313,7 @@ class VirtualHostRequestPublicationFactory:
if port is not None:
try:
port = int(port)
- except (ValueError):
+ except ValueError:
port = None
if self.port != port:
return False
@@ -845,7 +845,6 @@ Zope3WidgetsUseIBrowserFormNGMonkeyPatch.install()
class LaunchpadBrowserResponse(NotificationResponse, BrowserResponse):
-
# Note that NotificationResponse defines a 'redirect' method which
# needs to override the 'redirect' method in BrowserResponse
def __init__(self, header_output=None, http_transaction=None):
diff --git a/lib/lp/services/webapp/tests/test_adapter.py b/lib/lp/services/webapp/tests/test_adapter.py
index f409934..42cdb2a 100644
--- a/lib/lp/services/webapp/tests/test_adapter.py
+++ b/lib/lp/services/webapp/tests/test_adapter.py
@@ -17,7 +17,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, DatabaseLayer
class TestLaunchpadDatabase(TestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_authentication.py b/lib/lp/services/webapp/tests/test_authentication.py
index d508d1a..d91f1d7 100644
--- a/lib/lp/services/webapp/tests/test_authentication.py
+++ b/lib/lp/services/webapp/tests/test_authentication.py
@@ -39,7 +39,6 @@ class TestOAuthParsing(TestCase):
class TestCheckOAuthSignature(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeRequest(self, signature, method="PLAINTEXT"):
diff --git a/lib/lp/services/webapp/tests/test_authorization.py b/lib/lp/services/webapp/tests/test_authorization.py
index 3651ba8..b5224e6 100644
--- a/lib/lp/services/webapp/tests/test_authorization.py
+++ b/lib/lp/services/webapp/tests/test_authorization.py
@@ -515,7 +515,6 @@ class ILoneObject(Interface):
@implementer(ILoneObject)
class LoneObject(LaunchpadContainer):
-
_id_counter = count(1)
def __init__(self):
@@ -528,7 +527,6 @@ class LoneObject(LaunchpadContainer):
@implementer(ICanonicalUrlData)
class LoneObjectURL:
-
rootsite = None
inside = None
diff --git a/lib/lp/services/webapp/tests/test_authutility.py b/lib/lp/services/webapp/tests/test_authutility.py
index e124da2..ca72e0f 100644
--- a/lib/lp/services/webapp/tests/test_authutility.py
+++ b/lib/lp/services/webapp/tests/test_authutility.py
@@ -54,7 +54,6 @@ class FakePlacelessLoginSource:
class TestPlacelessAuth(TestCase):
-
layer = FunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_candid.py b/lib/lp/services/webapp/tests/test_candid.py
index c4f7c61..ae05d57 100644
--- a/lib/lp/services/webapp/tests/test_candid.py
+++ b/lib/lp/services/webapp/tests/test_candid.py
@@ -38,7 +38,6 @@ from lp.testing.pages import extract_text, find_tags_by_class
class TestExtractCandidCaveat(TestCase):
-
layer = BaseLayer
def setUp(self):
@@ -75,7 +74,6 @@ class TestExtractCandidCaveat(TestCase):
class TestRequestCandidDischarge(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_unconfigured(self):
@@ -317,7 +315,6 @@ class TestRequestCandidDischarge(TestCaseWithFactory):
class TestCandidCallbackView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_error.py b/lib/lp/services/webapp/tests/test_error.py
index ae7b93b..ee15ed4 100644
--- a/lib/lp/services/webapp/tests/test_error.py
+++ b/lib/lp/services/webapp/tests/test_error.py
@@ -40,7 +40,6 @@ class TimeoutException(Exception):
class TestSystemErrorView(TestCase):
-
layer = LaunchpadFunctionalLayer
def test_without_oops_id(self):
@@ -63,7 +62,6 @@ class TestSystemErrorView(TestCase):
class TestDatabaseErrorViews(TestCase):
-
layer = LaunchpadFunctionalLayer
def getHTTPError(self, url):
diff --git a/lib/lp/services/webapp/tests/test_errorlog.py b/lib/lp/services/webapp/tests/test_errorlog.py
index 6eb6caf..b535642 100644
--- a/lib/lp/services/webapp/tests/test_errorlog.py
+++ b/lib/lp/services/webapp/tests/test_errorlog.py
@@ -45,7 +45,6 @@ class ArbitraryException(Exception):
class TestErrorReportingUtility(TestCaseWithFactory):
-
# want rabbit
layer = LaunchpadZopelessLayer
diff --git a/lib/lp/services/webapp/tests/test_initialization.py b/lib/lp/services/webapp/tests/test_initialization.py
index f06b909..3c800b5 100644
--- a/lib/lp/services/webapp/tests/test_initialization.py
+++ b/lib/lp/services/webapp/tests/test_initialization.py
@@ -23,7 +23,6 @@ class AnyObject:
class TestURLNamespace(TestCase):
-
layer = FunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_notifications.py b/lib/lp/services/webapp/tests/test_notifications.py
index 0eae4fe..24e8fd7 100644
--- a/lib/lp/services/webapp/tests/test_notifications.py
+++ b/lib/lp/services/webapp/tests/test_notifications.py
@@ -114,7 +114,6 @@ class TestNotificationsBase:
class TestNotificationRequest(TestNotificationsBase, TestCase):
-
layer = FunctionalLayer
def test_provides_interface(self):
@@ -161,7 +160,6 @@ class TestNotificationRequest(TestNotificationsBase, TestCase):
class TestNotificationResponse(TestNotificationsBase, TestCase):
-
layer = FunctionalLayer
def test_provides_interface(self):
@@ -338,7 +336,6 @@ class TestNotificationResponseTextEscaping(TestNotificationsBase, TestCase):
class TestNotificationList(TestNotificationsBase, TestCase):
-
layer = FunctionalLayer
def test_empty(self):
diff --git a/lib/lp/services/webapp/tests/test_publication.py b/lib/lp/services/webapp/tests/test_publication.py
index ef68112..a9c246a 100644
--- a/lib/lp/services/webapp/tests/test_publication.py
+++ b/lib/lp/services/webapp/tests/test_publication.py
@@ -68,7 +68,6 @@ class TestLaunchpadBrowserPublication(TestCase):
class TestLaunchpadBrowserPublicationInteractionHandling(TestCase):
-
layer = DatabaseFunctionalLayer
def test_endRequest_removes_previous_interaction(self):
@@ -301,7 +300,6 @@ class TestBlockingOffsitePosts(TestCase):
class TestEncodedReferer(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_not_found(self):
@@ -317,7 +315,6 @@ class TestEncodedReferer(TestCaseWithFactory):
class TestUnicodePath(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_non_ascii_url(self):
@@ -332,7 +329,6 @@ class TestUnicodePath(TestCaseWithFactory):
class TestPublisherStats(StatsMixin, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_publisher.py b/lib/lp/services/webapp/tests/test_publisher.py
index 3db1f44..8e6cc93 100644
--- a/lib/lp/services/webapp/tests/test_publisher.py
+++ b/lib/lp/services/webapp/tests/test_publisher.py
@@ -34,7 +34,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestLaunchpadView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_servers.py b/lib/lp/services/webapp/tests/test_servers.py
index 98fbace..f865502 100644
--- a/lib/lp/services/webapp/tests/test_servers.py
+++ b/lib/lp/services/webapp/tests/test_servers.py
@@ -304,7 +304,6 @@ class TestVhostWebserviceFactory(WebServiceTestCase):
class TestWebServiceRequestTraversal(WebServiceTestCase):
-
testmodule_objects = [IGenericEntry, IGenericCollection]
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_session.py b/lib/lp/services/webapp/tests/test_session.py
index 31cd9b9..fcebd34 100644
--- a/lib/lp/services/webapp/tests/test_session.py
+++ b/lib/lp/services/webapp/tests/test_session.py
@@ -132,7 +132,6 @@ class TestLaunchpadCookieClientIdManager(TestCase):
class TestSessionRelatedFunctions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setupLoggedInRequest(self, user, request, when=None):
diff --git a/lib/lp/services/webapp/tests/test_snapshot.py b/lib/lp/services/webapp/tests/test_snapshot.py
index e30bff5..fb21433 100644
--- a/lib/lp/services/webapp/tests/test_snapshot.py
+++ b/lib/lp/services/webapp/tests/test_snapshot.py
@@ -20,7 +20,6 @@ from lp.testing.matchers import Provides
class IThing(Interface):
-
attr = Int()
@@ -31,7 +30,6 @@ class Thing:
class TestNotifyModified(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_generates_notification(self):
diff --git a/lib/lp/services/webapp/tests/test_statementtracer.py b/lib/lp/services/webapp/tests/test_statementtracer.py
index 383865d..f1227a3 100644
--- a/lib/lp/services/webapp/tests/test_statementtracer.py
+++ b/lib/lp/services/webapp/tests/test_statementtracer.py
@@ -44,7 +44,6 @@ def stderr():
class StubTime:
-
time = 1000.0
def __call__(self):
diff --git a/lib/lp/services/webapp/tests/test_status.py b/lib/lp/services/webapp/tests/test_status.py
index 9164e22..f217e18 100644
--- a/lib/lp/services/webapp/tests/test_status.py
+++ b/lib/lp/services/webapp/tests/test_status.py
@@ -15,7 +15,6 @@ from lp.testing.pages import http
class TestStatusView(TestCase):
-
layer = DatabaseFunctionalLayer
# The successful case of traversal is tested in TestStatusCheckView.
@@ -31,7 +30,6 @@ class TestStatusView(TestCase):
class TestStatusCheckView(TestCase):
-
layer = DatabaseFunctionalLayer
def test_ok(self):
diff --git a/lib/lp/services/webapp/tests/test_view_model.py b/lib/lp/services/webapp/tests/test_view_model.py
index f7cc65a..329fa64 100644
--- a/lib/lp/services/webapp/tests/test_view_model.py
+++ b/lib/lp/services/webapp/tests/test_view_model.py
@@ -84,7 +84,6 @@ class BaseProductModelTestView(LaunchpadView):
class TestJsonModelView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/services/webapp/tests/test_vocabulary.py b/lib/lp/services/webapp/tests/test_vocabulary.py
index f936524..1323a2b 100644
--- a/lib/lp/services/webapp/tests/test_vocabulary.py
+++ b/lib/lp/services/webapp/tests/test_vocabulary.py
@@ -29,7 +29,6 @@ class TestVocabulary(FilteredVocabularyBase):
class FilteredVocabularyBaseTestCase(TestCaseWithFactory):
-
layer = ZopelessLayer
def test_searchForTerms_filter_parameter_as_string(self):
diff --git a/lib/lp/services/webapp/wsgi.py b/lib/lp/services/webapp/wsgi.py
index 4e9dcd2..beb6602 100644
--- a/lib/lp/services/webapp/wsgi.py
+++ b/lib/lp/services/webapp/wsgi.py
@@ -42,7 +42,6 @@ from lp.services.config import config
@implementer(IParticipation)
class SystemConfigurationParticipation:
-
principal = system_user
interaction = None
diff --git a/lib/lp/services/webhooks/browser.py b/lib/lp/services/webhooks/browser.py
index 73b9f35..bb53917 100644
--- a/lib/lp/services/webhooks/browser.py
+++ b/lib/lp/services/webhooks/browser.py
@@ -36,7 +36,6 @@ from lp.services.webhooks.interfaces import IWebhook, IWebhookSet
class WebhookNavigation(Navigation):
-
usedfor = IWebhook
@stepthrough("+delivery")
@@ -78,7 +77,6 @@ class WebhooksView(LaunchpadView):
class WebhooksBreadcrumb(Breadcrumb):
-
text = "Webhooks"
@property
@@ -107,7 +105,6 @@ class WebhookEditSchema(Interface):
class WebhookAddView(LaunchpadFormView):
-
page_title = label = "Add webhook"
schema = WebhookEditSchema
@@ -142,7 +139,6 @@ class WebhookAddView(LaunchpadFormView):
class WebhookView(LaunchpadEditFormView):
-
label = "Manage webhook"
schema = WebhookEditSchema
@@ -183,7 +179,6 @@ class WebhookView(LaunchpadEditFormView):
class WebhookDeleteView(LaunchpadFormView):
-
schema = Interface
next_url = None
diff --git a/lib/lp/services/webhooks/interfaces.py b/lib/lp/services/webhooks/interfaces.py
index 306cffd..b00d45f 100644
--- a/lib/lp/services/webhooks/interfaces.py
+++ b/lib/lp/services/webhooks/interfaces.py
@@ -99,7 +99,6 @@ class ValidWebhookEventTypeVocabulary(SimpleVocabulary):
@exported_as_webservice_entry(as_of="beta")
class IWebhook(Interface):
-
id = Int(title=_("ID"), readonly=True, required=True)
target = exported(
@@ -216,7 +215,6 @@ class IWebhookSet(Interface):
@exported_as_webservice_entry(as_of="beta")
class IWebhookTarget(Interface):
-
webhooks = exported(
doNotSnapshot(
CollectionField(
diff --git a/lib/lp/services/webhooks/tests/test_browser.py b/lib/lp/services/webhooks/tests/test_browser.py
index 4392228..6284fe3 100644
--- a/lib/lp/services/webhooks/tests/test_browser.py
+++ b/lib/lp/services/webhooks/tests/test_browser.py
@@ -61,7 +61,6 @@ batch_nav_tag = soupmatchers.Tag(
class GitRepositoryTestHelpers:
-
event_type = "git:push:0.1"
expected_event_types = [
("ci:build:0.1", "CI build"),
@@ -77,7 +76,6 @@ class GitRepositoryTestHelpers:
class BranchTestHelpers:
-
event_type = "bzr:push:0.1"
expected_event_types = [
("bzr:push:0.1", "Bazaar push"),
@@ -92,7 +90,6 @@ class BranchTestHelpers:
class SnapTestHelpers:
-
event_type = "snap:build:0.1"
expected_event_types = [
("snap:build:0.1", "Snap build"),
@@ -150,7 +147,6 @@ class OCIRecipeTestHelpers:
class CharmRecipeTestHelpers:
-
event_type = "charm-recipe:build:0.1"
expected_event_types = [
("charm-recipe:build:0.1", "Charm recipe build"),
@@ -176,7 +172,6 @@ class CharmRecipeTestHelpers:
class BugUpdateTestHelpersBase:
-
# Overriding this since product webhooks don't have breadcrumbs
_webhook_listing = soupmatchers.HTMLContains(add_webhook_tag)
@@ -252,7 +247,6 @@ class WebhookTargetViewTestHelpers:
class TestWebhooksViewBase(WebhookTargetViewTestHelpers):
-
layer = DatabaseFunctionalLayer
_webhook_listing = webhook_listing_constants
@@ -348,7 +342,6 @@ class TestWebhooksViewBase(WebhookTargetViewTestHelpers):
class TestWebhooksViewGitRepository(
TestWebhooksViewBase, GitRepositoryTestHelpers, TestCaseWithFactory
):
-
pass
@@ -361,42 +354,36 @@ class TestWebhooksViewBranch(
class TestWebhooksViewSnap(
TestWebhooksViewBase, SnapTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhooksViewLiveFS(
TestWebhooksViewBase, LiveFSTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhooksViewOCIRecipe(
TestWebhooksViewBase, OCIRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhooksViewCharmRecipe(
TestWebhooksViewBase, CharmRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhooksViewProductBugUpdate(
ProductTestHelpers, TestWebhooksViewBase, TestCaseWithFactory
):
-
pass
class TestWebhooksViewDistributionBugUpdate(
DistributionTestHelpers, TestWebhooksViewBase, TestCaseWithFactory
):
-
pass
@@ -405,12 +392,10 @@ class TestWebhooksViewDistributionSourcePackageBugUpdate(
TestWebhooksViewBase,
TestCaseWithFactory,
):
-
pass
class TestWebhookAddViewBase(WebhookTargetViewTestHelpers):
-
layer = DatabaseFunctionalLayer
def test_rendering(self):
@@ -519,56 +504,48 @@ class TestWebhookAddViewBase(WebhookTargetViewTestHelpers):
class TestWebhookAddViewGitRepository(
TestWebhookAddViewBase, GitRepositoryTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookAddViewBranch(
TestWebhookAddViewBase, BranchTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookAddViewSnap(
TestWebhookAddViewBase, SnapTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookAddViewLiveFS(
TestWebhookAddViewBase, LiveFSTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookAddViewOCIRecipe(
TestWebhookAddViewBase, OCIRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookAddViewCharmRecipe(
TestWebhookAddViewBase, CharmRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookAddViewProductBugUpdate(
ProductTestHelpers, TestWebhookAddViewBase, TestCaseWithFactory
):
-
pass
class TestWebhookAddViewDistributionBugUpdate(
DistributionTestHelpers, TestWebhookAddViewBase, TestCaseWithFactory
):
-
pass
@@ -577,7 +554,6 @@ class TestWebhookAddViewDistributionSourcePackageBugUpdate(
TestWebhookAddViewBase,
TestCaseWithFactory,
):
-
pass
@@ -605,7 +581,6 @@ class WebhookViewTestHelpers:
class TestWebhookViewBase(WebhookViewTestHelpers):
-
layer = DatabaseFunctionalLayer
def test_rendering(self):
@@ -695,47 +670,40 @@ class TestWebhookViewBase(WebhookViewTestHelpers):
class TestWebhookViewGitRepository(
TestWebhookViewBase, GitRepositoryTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookViewBranch(
TestWebhookViewBase, BranchTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookViewSnap(
TestWebhookViewBase, SnapTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookViewLiveFS(
TestWebhookViewBase, LiveFSTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookViewOCIRecipe(
TestWebhookViewBase, OCIRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookViewCharmRecipe(
TestWebhookViewBase, CharmRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewBase(WebhookViewTestHelpers):
-
layer = DatabaseFunctionalLayer
def test_rendering(self):
@@ -784,56 +752,48 @@ class TestWebhookDeleteViewBase(WebhookViewTestHelpers):
class TestWebhookDeleteViewGitRepository(
TestWebhookDeleteViewBase, GitRepositoryTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewBranch(
TestWebhookDeleteViewBase, BranchTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewSnap(
TestWebhookDeleteViewBase, SnapTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewLiveFS(
TestWebhookDeleteViewBase, LiveFSTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewOCIRecipe(
TestWebhookDeleteViewBase, OCIRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewCharmRecipe(
TestWebhookDeleteViewBase, CharmRecipeTestHelpers, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewProductBugUpdate(
ProductTestHelpers, TestWebhookDeleteViewBase, TestCaseWithFactory
):
-
pass
class TestWebhookDeleteViewDistributionBugUpdate(
DistributionTestHelpers, TestWebhookDeleteViewBase, TestCaseWithFactory
):
-
pass
@@ -842,5 +802,4 @@ class TestWebhookDeleteViewDistributionSourcePackageBugUpdate(
TestWebhookDeleteViewBase,
TestCaseWithFactory,
):
-
pass
diff --git a/lib/lp/services/webhooks/tests/test_job.py b/lib/lp/services/webhooks/tests/test_job.py
index 46e07e6..eaca18c 100644
--- a/lib/lp/services/webhooks/tests/test_job.py
+++ b/lib/lp/services/webhooks/tests/test_job.py
@@ -85,7 +85,6 @@ class TestWebhookJob(TestCaseWithFactory):
class TestWebhookJobSource(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_deleteByIDs(self):
@@ -916,7 +915,6 @@ class TestWebhookDeliveryJob(TestCaseWithFactory):
class TestViaCronscript(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_run_from_cronscript(self):
@@ -946,7 +944,6 @@ class TestViaCronscript(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_WebhookDeliveryJob(self):
diff --git a/lib/lp/services/webhooks/tests/test_model.py b/lib/lp/services/webhooks/tests/test_model.py
index 47031b4..ede094c 100644
--- a/lib/lp/services/webhooks/tests/test_model.py
+++ b/lib/lp/services/webhooks/tests/test_model.py
@@ -39,7 +39,6 @@ from lp.testing.matchers import HasQueryCount
class TestWebhook(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_modifiedevent_sets_date_last_modified(self):
@@ -74,7 +73,6 @@ class TestWebhook(TestCaseWithFactory):
class TestWebhookPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def get_target_owner(self, target):
@@ -140,7 +138,6 @@ class TestWebhookPermissions(TestCaseWithFactory):
class TestWebhookSetBase:
-
layer = DatabaseFunctionalLayer
def get_target_owner(self, target):
@@ -420,7 +417,6 @@ class TestWebhookSetMergeProposalBase(TestWebhookSetBase):
class TestWebhookSetGitRepository(
TestWebhookSetMergeProposalBase, TestCaseWithFactory
):
-
event_type = "git:push:0.1"
def makeTarget(self, project=None, **kwargs):
@@ -448,7 +444,6 @@ class TestWebhookSetGitRepository(
class TestWebhookSetBranch(
TestWebhookSetMergeProposalBase, TestCaseWithFactory
):
-
event_type = "bzr:push:0.1"
def makeTarget(self, project=None, **kwargs):
@@ -472,7 +467,6 @@ class TestWebhookSetBranch(
class TestWebhookSetSnap(TestWebhookSetBase, TestCaseWithFactory):
-
event_type = "snap:build:0.1"
def makeTarget(self, owner=None, **kwargs):
@@ -482,7 +476,6 @@ class TestWebhookSetSnap(TestWebhookSetBase, TestCaseWithFactory):
class TestWebhookSetLiveFS(TestWebhookSetBase, TestCaseWithFactory):
-
event_type = "livefs:build:0.1"
def makeTarget(self, owner=None, **kwargs):
@@ -498,7 +491,6 @@ class TestWebhookSetLiveFS(TestWebhookSetBase, TestCaseWithFactory):
class TestWebhookSetOCIRecipe(TestWebhookSetBase, TestCaseWithFactory):
-
event_type = "oci-recipe:build:0.1"
def makeTarget(self, owner=None, **kwargs):
@@ -512,7 +504,6 @@ class TestWebhookSetOCIRecipe(TestWebhookSetBase, TestCaseWithFactory):
class TestWebhookSetCharmRecipe(TestWebhookSetBase, TestCaseWithFactory):
-
event_type = "charm-recipe:build:0.1"
def makeTarget(self, owner=None, **kwargs):
@@ -531,7 +522,6 @@ class TestWebhookSetCharmRecipe(TestWebhookSetBase, TestCaseWithFactory):
class TestWebhookSetBugBase(TestWebhookSetBase):
-
event_type = "bug:0.1"
def test__checkVisibility_private_artifact(self):
diff --git a/lib/lp/services/webhooks/tests/test_payload.py b/lib/lp/services/webhooks/tests/test_payload.py
index 06a898c..c2c2807 100644
--- a/lib/lp/services/webhooks/tests/test_payload.py
+++ b/lib/lp/services/webhooks/tests/test_payload.py
@@ -10,7 +10,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestComposeWebhookPayload(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_serialises(self):
diff --git a/lib/lp/services/webhooks/tests/test_webservice.py b/lib/lp/services/webhooks/tests/test_webservice.py
index a6f9c0b..810a83d 100644
--- a/lib/lp/services/webhooks/tests/test_webservice.py
+++ b/lib/lp/services/webhooks/tests/test_webservice.py
@@ -461,7 +461,6 @@ class TestWebhookTargetBase:
class TestWebhookTargetGitRepository(
TestWebhookTargetBase, TestCaseWithFactory
):
-
event_type = "git:push:0.1"
def makeTarget(self):
@@ -469,7 +468,6 @@ class TestWebhookTargetGitRepository(
class TestWebhookTargetBranch(TestWebhookTargetBase, TestCaseWithFactory):
-
event_type = "bzr:push:0.1"
def makeTarget(self):
@@ -477,7 +475,6 @@ class TestWebhookTargetBranch(TestWebhookTargetBase, TestCaseWithFactory):
class TestWebhookTargetSnap(TestWebhookTargetBase, TestCaseWithFactory):
-
event_type = "snap:build:0.1"
def makeTarget(self):
@@ -486,7 +483,6 @@ class TestWebhookTargetSnap(TestWebhookTargetBase, TestCaseWithFactory):
class TestWebhookTargetLiveFS(TestWebhookTargetBase, TestCaseWithFactory):
-
event_type = "livefs:build:0.1"
def makeTarget(self):
@@ -498,7 +494,6 @@ class TestWebhookTargetLiveFS(TestWebhookTargetBase, TestCaseWithFactory):
class TestWebhookTargetOCIRecipe(TestWebhookTargetBase, TestCaseWithFactory):
-
event_type = "oci-recipe:build:0.1"
def makeTarget(self):
@@ -508,7 +503,6 @@ class TestWebhookTargetOCIRecipe(TestWebhookTargetBase, TestCaseWithFactory):
class TestWebhookTargetCharmRecipe(TestWebhookTargetBase, TestCaseWithFactory):
-
event_type = "charm-recipe:build:0.1"
def makeTarget(self):
@@ -523,7 +517,6 @@ class TestWebhookTargetCharmRecipe(TestWebhookTargetBase, TestCaseWithFactory):
class TestWebhookTargetProduct(TestWebhookTargetBase, TestCaseWithFactory):
-
event_type = "bug:0.1"
def makeTarget(self):
@@ -534,7 +527,6 @@ class TestWebhookTargetProduct(TestWebhookTargetBase, TestCaseWithFactory):
class TestWebhookTargetDistribution(
TestWebhookTargetBase, TestCaseWithFactory
):
-
event_type = "bug:0.1"
def makeTarget(self):
@@ -545,7 +537,6 @@ class TestWebhookTargetDistribution(
class TestWebhookTargetDistributionSourcePackage(
TestWebhookTargetBase, TestCaseWithFactory
):
-
event_type = "bug:0.1"
def makeTarget(self):
diff --git a/lib/lp/services/webhooks/tests/test_yuitests.py b/lib/lp/services/webhooks/tests/test_yuitests.py
index e77a7b9..16a1c4f 100644
--- a/lib/lp/services/webhooks/tests/test_yuitests.py
+++ b/lib/lp/services/webhooks/tests/test_yuitests.py
@@ -10,7 +10,6 @@ from lp.testing.layers import YUITestLayer
class WebhooksYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "WebhooksYUIUnitTests"
diff --git a/lib/lp/services/webservice/configuration.py b/lib/lp/services/webservice/configuration.py
index 330aa16..ff39ae4 100644
--- a/lib/lp/services/webservice/configuration.py
+++ b/lib/lp/services/webservice/configuration.py
@@ -26,7 +26,6 @@ from lp.services.webapp.servers import (
class LaunchpadWebServiceConfiguration(BaseWebServiceConfiguration):
-
path_override = "api"
active_versions = ["beta", "1.0", "devel"]
last_version_with_mutator_named_operations = "beta"
diff --git a/lib/lp/services/worlddata/model/language.py b/lib/lp/services/worlddata/model/language.py
index dcc7cf9..c3cd90a 100644
--- a/lib/lp/services/worlddata/model/language.py
+++ b/lib/lp/services/worlddata/model/language.py
@@ -35,7 +35,6 @@ from lp.services.worlddata.interfaces.language import (
@implementer(ILanguage)
class Language(SQLBase):
-
_table = "Language"
code = StringCol(dbName="code", notNull=True, unique=True)
diff --git a/lib/lp/services/worlddata/tests/test_helpers.py b/lib/lp/services/worlddata/tests/test_helpers.py
index 68a84c4..30e6bbf 100644
--- a/lib/lp/services/worlddata/tests/test_helpers.py
+++ b/lib/lp/services/worlddata/tests/test_helpers.py
@@ -29,7 +29,6 @@ class FakeLanguage:
@implementer(ILanguageSet)
class FakeLanguageSet:
-
_languages = {
"ja": FakeLanguage("ja", 1),
"es": FakeLanguage("es", 2),
@@ -98,7 +97,6 @@ class FakeLaunchBag:
class TestPreferredOrRequestLanguages(TestCase):
-
layer = FunctionalLayer
def test_single_preferred_language(self):
@@ -159,7 +157,6 @@ class TestPreferredOrRequestLanguages(TestCase):
class TestIsEnglishVariant(TestCase):
-
layer = BaseLayer
def test_fr(self):
diff --git a/lib/lp/services/xref/tests/test_model.py b/lib/lp/services/xref/tests/test_model.py
index 8eeccaf..c7bc3cd 100644
--- a/lib/lp/services/xref/tests/test_model.py
+++ b/lib/lp/services/xref/tests/test_model.py
@@ -19,7 +19,6 @@ from lp.testing.matchers import HasQueryCount
class TestXRefSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_create_sets_date_created(self):
diff --git a/lib/lp/snappy/adapters/tests/test_buildarch.py b/lib/lp/snappy/adapters/tests/test_buildarch.py
index 399ea76..a5ae901 100644
--- a/lib/lp/snappy/adapters/tests/test_buildarch.py
+++ b/lib/lp/snappy/adapters/tests/test_buildarch.py
@@ -19,7 +19,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestSnapArchitecture(WithScenarios, TestCase):
-
scenarios = [
(
"lists",
@@ -92,7 +91,6 @@ class TestSnapArchitecture(WithScenarios, TestCase):
class TestSnapBuildInstance(WithScenarios, TestCase):
-
# Single-item scenarios taken from the architectures document:
# https://forum.snapcraft.io/t/architectures/4972
scenarios = [
diff --git a/lib/lp/snappy/browser/snap.py b/lib/lp/snappy/browser/snap.py
index 6d11a20..5ac873a 100644
--- a/lib/lp/snappy/browser/snap.py
+++ b/lib/lp/snappy/browser/snap.py
@@ -362,6 +362,7 @@ def builds_and_requests_for_snap(snap):
Builds that the user does not have permission to see are excluded (by
the model code).
"""
+
# We need to interleave items of different types, so SQL can't do all
# the sorting for us.
def make_sort_key(*date_attrs):
@@ -773,7 +774,6 @@ class BaseSnapEditView(
SnapFormMixin,
LaunchpadEditFormView,
):
-
schema = ISnapEditSchema
next_url = None
diff --git a/lib/lp/snappy/browser/snaplisting.py b/lib/lp/snappy/browser/snaplisting.py
index 410c8ab..1317f08 100644
--- a/lib/lp/snappy/browser/snaplisting.py
+++ b/lib/lp/snappy/browser/snaplisting.py
@@ -23,7 +23,6 @@ from lp.snappy.interfaces.snap import ISnapSet
class SnapListingView(LaunchpadView, FeedsMixin):
-
feed_types = ()
source_enabled = True
@@ -55,7 +54,6 @@ class SnapListingView(LaunchpadView, FeedsMixin):
class BranchSnapListingView(SnapListingView):
-
source_enabled = False
def initialize(self):
@@ -67,7 +65,6 @@ class BranchSnapListingView(SnapListingView):
class GitSnapListingView(SnapListingView):
-
source_enabled = False
@property
@@ -78,7 +75,6 @@ class GitSnapListingView(SnapListingView):
class PersonSnapListingView(SnapListingView):
-
owner_enabled = False
diff --git a/lib/lp/snappy/browser/snapsubscription.py b/lib/lp/snappy/browser/snapsubscription.py
index 7bbc80e..ffd2dc7 100644
--- a/lib/lp/snappy/browser/snapsubscription.py
+++ b/lib/lp/snappy/browser/snapsubscription.py
@@ -119,7 +119,6 @@ class _SnapSubscriptionCreationView(RedirectToSnapMixin, LaunchpadFormView):
class SnapSubscriptionAddView(_SnapSubscriptionCreationView):
-
page_title = label = "Subscribe to snap recipe"
@action("Subscribe")
diff --git a/lib/lp/snappy/browser/tests/test_hassnaps.py b/lib/lp/snappy/browser/tests/test_hassnaps.py
index edad008..2c9592a 100644
--- a/lib/lp/snappy/browser/tests/test_hassnaps.py
+++ b/lib/lp/snappy/browser/tests/test_hassnaps.py
@@ -28,7 +28,6 @@ def make_git_ref(test_case):
class TestHasSnapsView(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
scenarios = [
@@ -97,7 +96,6 @@ class TestHasSnapsView(WithScenarios, TestCaseWithFactory):
class TestHasSnapsMenu(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
needs_git_hosting_fixture = False
diff --git a/lib/lp/snappy/browser/tests/test_snap.py b/lib/lp/snappy/browser/tests/test_snap.py
index c6e6e0c..3c93e2a 100644
--- a/lib/lp/snappy/browser/tests/test_snap.py
+++ b/lib/lp/snappy/browser/tests/test_snap.py
@@ -88,7 +88,6 @@ from lp.testing.views import create_initialized_view, create_view
class TestSnapNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -113,7 +112,6 @@ class TestSnapNavigation(TestCaseWithFactory):
class TestSnapViewsFeatureFlag(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_private_feature_flag_disabled(self):
@@ -134,7 +132,6 @@ class TestSnapViewsFeatureFlag(TestCaseWithFactory):
class BaseTestSnapView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/snappy/browser/tests/test_snapbuild.py b/lib/lp/snappy/browser/tests/test_snapbuild.py
index 5c25aaf..20a5f6d 100644
--- a/lib/lp/snappy/browser/tests/test_snapbuild.py
+++ b/lib/lp/snappy/browser/tests/test_snapbuild.py
@@ -41,7 +41,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrlForSnapBuild(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_canonical_url(self):
@@ -57,7 +56,6 @@ class TestCanonicalUrlForSnapBuild(TestCaseWithFactory):
class TestSnapBuildView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_files(self):
@@ -342,7 +340,6 @@ class TestSnapBuildView(TestCaseWithFactory):
class TestSnapBuildOperations(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/snappy/browser/tests/test_snaplisting.py b/lib/lp/snappy/browser/tests/test_snaplisting.py
index 96a0860..90ffea1 100644
--- a/lib/lp/snappy/browser/tests/test_snaplisting.py
+++ b/lib/lp/snappy/browser/tests/test_snaplisting.py
@@ -28,7 +28,6 @@ from lp.testing.views import create_initialized_view
class TestSnapListing(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def assertSnapsLink(
diff --git a/lib/lp/snappy/browser/tests/test_snapsubscription.py b/lib/lp/snappy/browser/tests/test_snapsubscription.py
index b196192..eb960c4 100644
--- a/lib/lp/snappy/browser/tests/test_snapsubscription.py
+++ b/lib/lp/snappy/browser/tests/test_snapsubscription.py
@@ -22,7 +22,6 @@ from lp.testing.pages import (
class BaseTestSnapView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/snappy/browser/widgets/snaparchive.py b/lib/lp/snappy/browser/widgets/snaparchive.py
index a1400c4..30a3d54 100644
--- a/lib/lp/snappy/browser/widgets/snaparchive.py
+++ b/lib/lp/snappy/browser/widgets/snaparchive.py
@@ -36,7 +36,6 @@ from lp.soyuz.interfaces.archive import IArchive
@implementer(IMultiLineWidgetLayout, IAlwaysSubmittedWidget, IInputWidget)
class SnapArchiveWidget(BrowserWidget, InputWidget):
-
template = ViewPageTemplateFile("templates/snaparchive.pt")
default_option = "primary"
_widgets_set_up = False
diff --git a/lib/lp/snappy/browser/widgets/snapbuildchannels.py b/lib/lp/snappy/browser/widgets/snapbuildchannels.py
index 17a6786..c5262bb 100644
--- a/lib/lp/snappy/browser/widgets/snapbuildchannels.py
+++ b/lib/lp/snappy/browser/widgets/snapbuildchannels.py
@@ -26,7 +26,6 @@ from lp.snappy.interfaces.snap import SNAP_SNAPCRAFT_CHANNEL_FEATURE_FLAG
@implementer(ISingleLineWidgetLayout, IAlwaysSubmittedWidget, IInputWidget)
class SnapBuildChannelsWidget(BrowserWidget, InputWidget):
-
template = ViewPageTemplateFile("templates/snapbuildchannels.pt")
hint = False
snap_names = ["core", "core18", "core20", "core22", "snapcraft"]
diff --git a/lib/lp/snappy/browser/widgets/storechannels.py b/lib/lp/snappy/browser/widgets/storechannels.py
index af23ff5..3f07b83 100644
--- a/lib/lp/snappy/browser/widgets/storechannels.py
+++ b/lib/lp/snappy/browser/widgets/storechannels.py
@@ -30,7 +30,6 @@ from lp.snappy.interfaces.snap import ISnap
@implementer(ISingleLineWidgetLayout, IAlwaysSubmittedWidget, IInputWidget)
class StoreChannelsWidget(BrowserWidget, InputWidget):
-
template = ViewPageTemplateFile("templates/storechannels.pt")
_default_track = "latest"
_widgets_set_up = False
diff --git a/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py b/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
index bd11e85..219cf03 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_snaparchivewidget.py
@@ -42,7 +42,6 @@ def make_git_repository(test_case):
class TestSnapArchiveWidget(WithScenarios, TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
scenarios = [
diff --git a/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py b/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
index 9b71b4c..6c8e423 100644
--- a/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
+++ b/lib/lp/snappy/browser/widgets/tests/test_snapbuildchannelswidget.py
@@ -16,7 +16,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestSnapBuildChannelsWidget(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/snappy/mail/snapbuild.py b/lib/lp/snappy/mail/snapbuild.py
index ca70774..2dbe9dc 100644
--- a/lib/lp/snappy/mail/snapbuild.py
+++ b/lib/lp/snappy/mail/snapbuild.py
@@ -12,7 +12,6 @@ from lp.services.webapp import canonical_url
class SnapBuildMailer(BaseMailer):
-
app = "snappy"
@classmethod
diff --git a/lib/lp/snappy/model/snapbuild.py b/lib/lp/snappy/model/snapbuild.py
index c63f4a3..4fdd7a0 100644
--- a/lib/lp/snappy/model/snapbuild.py
+++ b/lib/lp/snappy/model/snapbuild.py
@@ -667,7 +667,6 @@ class SnapBuildSet(SpecificBuildFarmJobSourceMixin):
@implementer(IMacaroonIssuer)
class SnapBuildMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "snap-build"
issuable_via_authserver = True
diff --git a/lib/lp/snappy/tests/test_snap.py b/lib/lp/snappy/tests/test_snap.py
index 27ce3f6..a754b03 100644
--- a/lib/lp/snappy/tests/test_snap.py
+++ b/lib/lp/snappy/tests/test_snap.py
@@ -137,7 +137,6 @@ from lp.testing.pages import webservice_for_person
class TestSnapFeatureFlag(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_private_feature_flag_disabled(self):
@@ -156,7 +155,6 @@ class TestSnapFeatureFlag(TestCaseWithFactory):
class TestSnapPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -263,7 +261,6 @@ class TestSnapPermissions(TestCaseWithFactory):
class TestSnap(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1958,7 +1955,6 @@ class TestSnap(TestCaseWithFactory):
class TestSnapDeleteWithBuilds(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -2103,7 +2099,6 @@ class TestSnapDeleteWithBuilds(TestCaseWithFactory):
class TestSnapVisibility(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -2273,7 +2268,6 @@ class TestSnapVisibility(TestCaseWithFactory):
class TestSnapSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -3504,7 +3498,6 @@ class TestSnapSet(TestCaseWithFactory):
class TestSnapProcessors(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -3655,7 +3648,6 @@ class TestSnapProcessors(TestCaseWithFactory):
class TestSnapWebservice(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/snappy/tests/test_snapbase.py b/lib/lp/snappy/tests/test_snapbase.py
index e7cd522..d00a4a0 100644
--- a/lib/lp/snappy/tests/test_snapbase.py
+++ b/lib/lp/snappy/tests/test_snapbase.py
@@ -38,7 +38,6 @@ from lp.testing.pages import webservice_for_person
class TestSnapBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_implements_interface(self):
@@ -100,7 +99,6 @@ class TestSnapBase(TestCaseWithFactory):
class TestSnapBaseProcessors(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -160,7 +158,6 @@ class TestSnapBaseProcessors(TestCaseWithFactory):
class TestSnapBaseSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_getByName(self):
@@ -203,7 +200,6 @@ class TestSnapBaseSet(TestCaseWithFactory):
class TestSnapBaseWebservice(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_new_unpriv(self):
diff --git a/lib/lp/snappy/tests/test_snapbuild.py b/lib/lp/snappy/tests/test_snapbuild.py
index fa1f0a7..36c1481 100644
--- a/lib/lp/snappy/tests/test_snapbuild.py
+++ b/lib/lp/snappy/tests/test_snapbuild.py
@@ -81,7 +81,6 @@ expected_body = """\
class TestSnapBuild(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -803,7 +802,6 @@ class TestSnapBuild(TestCaseWithFactory):
class TestSnapBuildSet(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -839,7 +837,6 @@ class TestSnapBuildSet(TestCaseWithFactory):
class TestSnapBuildWebservice(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/snappy/tests/test_snapbuildbehaviour.py b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
index b1d888b..8050ecd 100644
--- a/lib/lp/snappy/tests/test_snapbuildbehaviour.py
+++ b/lib/lp/snappy/tests/test_snapbuildbehaviour.py
@@ -106,7 +106,6 @@ class FormatAsRfc3339TestCase(TestCase):
class TestSnapBuildBehaviourBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/snappy/tests/test_snapbuildjob.py b/lib/lp/snappy/tests/test_snapbuildjob.py
index e8855cc..baf457a 100644
--- a/lib/lp/snappy/tests/test_snapbuildjob.py
+++ b/lib/lp/snappy/tests/test_snapbuildjob.py
@@ -90,7 +90,6 @@ class FileUploaded(MatchesListwise):
class TestSnapBuildJob(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -107,7 +106,6 @@ class TestSnapBuildJob(TestCaseWithFactory):
class TestSnapStoreUploadJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/snappy/tests/test_snapjob.py b/lib/lp/snappy/tests/test_snapjob.py
index 0fb2ba9..91d99a5 100644
--- a/lib/lp/snappy/tests/test_snapjob.py
+++ b/lib/lp/snappy/tests/test_snapjob.py
@@ -34,7 +34,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestSnapJob(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_provides_interface(self):
@@ -46,7 +45,6 @@ class TestSnapJob(TestCaseWithFactory):
class TestSnapRequestBuildsJob(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_provides_interface(self):
diff --git a/lib/lp/snappy/tests/test_snappyseries.py b/lib/lp/snappy/tests/test_snappyseries.py
index b92b044..bae6eb4 100644
--- a/lib/lp/snappy/tests/test_snappyseries.py
+++ b/lib/lp/snappy/tests/test_snappyseries.py
@@ -30,7 +30,6 @@ from lp.testing.pages import webservice_for_person
class TestSnappySeries(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -97,7 +96,6 @@ class TestSnappySeries(TestCaseWithFactory):
class TestSnappySeriesSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -123,7 +121,6 @@ class TestSnappySeriesSet(TestCaseWithFactory):
class TestSnappySeriesWebservice(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -254,7 +251,6 @@ class TestSnappySeriesWebservice(TestCaseWithFactory):
class TestSnappyDistroSeriesSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/snappy/tests/test_snapstoreclient.py b/lib/lp/snappy/tests/test_snapstoreclient.py
index 3dc546a..e1516f2 100644
--- a/lib/lp/snappy/tests/test_snapstoreclient.py
+++ b/lib/lp/snappy/tests/test_snapstoreclient.py
@@ -250,7 +250,6 @@ class RequestMatches(Matcher):
class TestSnapStoreClient(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/snappy/tests/test_yuitests.py b/lib/lp/snappy/tests/test_yuitests.py
index 54343c2..4b58d05 100644
--- a/lib/lp/snappy/tests/test_yuitests.py
+++ b/lib/lp/snappy/tests/test_yuitests.py
@@ -10,7 +10,6 @@ from lp.testing.layers import YUITestLayer
class SnappyYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "SnappyYUIUnitTests"
diff --git a/lib/lp/snappy/validators/tests/test_channels.py b/lib/lp/snappy/validators/tests/test_channels.py
index a9d9e5e..e8311c8 100644
--- a/lib/lp/snappy/validators/tests/test_channels.py
+++ b/lib/lp/snappy/validators/tests/test_channels.py
@@ -8,7 +8,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestChannelsValidator(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_channels_validator_valid(self):
diff --git a/lib/lp/soyuz/adapters/overrides.py b/lib/lp/soyuz/adapters/overrides.py
index 1ce3fdb..dfb4aaf 100644
--- a/lib/lp/soyuz/adapters/overrides.py
+++ b/lib/lp/soyuz/adapters/overrides.py
@@ -400,7 +400,7 @@ class FromExistingOverridePolicy(BaseOverridePolicy):
pre_iter_hook=eager_load,
)
overrides = {}
- for (name, das, comp, sect, prio, status, ver) in already_published:
+ for name, das, comp, sect, prio, status, ver in already_published:
# These details can always fulfill their own archtag, and may
# satisfy a None archtag if the DAS is nominatedarchindep.
if not self.any_arch:
diff --git a/lib/lp/soyuz/adapters/tests/test_copypolicy.py b/lib/lp/soyuz/adapters/tests/test_copypolicy.py
index 32a41df..f7219be 100644
--- a/lib/lp/soyuz/adapters/tests/test_copypolicy.py
+++ b/lib/lp/soyuz/adapters/tests/test_copypolicy.py
@@ -11,7 +11,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestCopyPolicy(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def _getUploadCriteria(self, archive_purpose, status=None, pocket=None):
diff --git a/lib/lp/soyuz/adapters/tests/test_gomodparser.py b/lib/lp/soyuz/adapters/tests/test_gomodparser.py
index 014f2aa..588ab2b 100644
--- a/lib/lp/soyuz/adapters/tests/test_gomodparser.py
+++ b/lib/lp/soyuz/adapters/tests/test_gomodparser.py
@@ -9,7 +9,6 @@ from lp.testing.layers import BaseLayer
class TestParseGoMod(TestCase):
-
layer = BaseLayer
def test_module_identifier(self):
diff --git a/lib/lp/soyuz/adapters/tests/test_overrides.py b/lib/lp/soyuz/adapters/tests/test_overrides.py
index 85deb99..5b1c24c 100644
--- a/lib/lp/soyuz/adapters/tests/test_overrides.py
+++ b/lib/lp/soyuz/adapters/tests/test_overrides.py
@@ -26,7 +26,6 @@ from lp.testing.matchers import HasQueryCount
class TestFromExistingOverridePolicy(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_source_overrides(self):
@@ -495,7 +494,6 @@ class TestFromExistingOverridePolicy(TestCaseWithFactory):
class TestFromSourceOverridePolicy(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_no_sources(self):
@@ -531,7 +529,6 @@ class TestFromSourceOverridePolicy(TestCaseWithFactory):
class TestUnknownOverridePolicy(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_getComponentOverride_default_name(self):
@@ -620,7 +617,6 @@ class TestUnknownOverridePolicy(TestCaseWithFactory):
class TestConstantOverridePolicy(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_sources(self):
@@ -684,7 +680,6 @@ class TestConstantOverridePolicy(TestCaseWithFactory):
class TestFallbackOverridePolicy(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_fallback_sources(self):
diff --git a/lib/lp/soyuz/browser/archive.py b/lib/lp/soyuz/browser/archive.py
index 11ffdba..f46da5b 100644
--- a/lib/lp/soyuz/browser/archive.py
+++ b/lib/lp/soyuz/browser/archive.py
@@ -2235,7 +2235,6 @@ class ArchiveBuildsView(ArchiveViewBase, BuildRecordsView):
class BaseArchiveEditView(LaunchpadEditFormView, ArchiveViewBase):
-
schema = IArchive
field_names = []
next_url = None
@@ -2317,7 +2316,6 @@ class EnableProcessorsMixin:
class ArchiveEditView(BaseArchiveEditView, EnableProcessorsMixin):
-
field_names = [
"displayname",
"description",
@@ -2371,7 +2369,6 @@ class ArchiveEditView(BaseArchiveEditView, EnableProcessorsMixin):
class ArchiveAdminView(BaseArchiveEditView, EnableProcessorsMixin):
-
field_names = [
"enabled",
"private",
diff --git a/lib/lp/soyuz/browser/distroarchseries.py b/lib/lp/soyuz/browser/distroarchseries.py
index 8415df0..6e45e32 100644
--- a/lib/lp/soyuz/browser/distroarchseries.py
+++ b/lib/lp/soyuz/browser/distroarchseries.py
@@ -34,7 +34,6 @@ from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries
class DistroArchSeriesNavigation(GetitemNavigation):
-
usedfor = IDistroArchSeries
@stepto("+source-filter")
@@ -97,7 +96,6 @@ class DistroArchSeriesAddSchema(IDistroArchSeries):
class DistroArchSeriesAddView(LaunchpadFormView):
-
schema = DistroArchSeriesAddSchema
field_names = ["architecturetag", "processor", "official"]
next_url = None
diff --git a/lib/lp/soyuz/browser/distroarchseriesbinarypackage.py b/lib/lp/soyuz/browser/distroarchseriesbinarypackage.py
index d3d70f1..74047d2 100644
--- a/lib/lp/soyuz/browser/distroarchseriesbinarypackage.py
+++ b/lib/lp/soyuz/browser/distroarchseriesbinarypackage.py
@@ -15,7 +15,6 @@ from lp.soyuz.interfaces.distroarchseriesbinarypackage import (
class DistroArchSeriesBinaryPackageNavigation(GetitemNavigation):
-
usedfor = IDistroArchSeriesBinaryPackage
diff --git a/lib/lp/soyuz/browser/distroseriesbinarypackage.py b/lib/lp/soyuz/browser/distroseriesbinarypackage.py
index 780a88e..4109582 100644
--- a/lib/lp/soyuz/browser/distroseriesbinarypackage.py
+++ b/lib/lp/soyuz/browser/distroseriesbinarypackage.py
@@ -17,7 +17,6 @@ from lp.soyuz.interfaces.distroseriesbinarypackage import (
class DistroSeriesBinaryPackageNavigation(Navigation):
-
usedfor = IDistroSeriesBinaryPackage
diff --git a/lib/lp/soyuz/browser/livefs.py b/lib/lp/soyuz/browser/livefs.py
index b5c1cfc..eb47be0 100644
--- a/lib/lp/soyuz/browser/livefs.py
+++ b/lib/lp/soyuz/browser/livefs.py
@@ -280,7 +280,6 @@ class LiveFSAddView(LiveFSMetadataValidatorMixin, LaunchpadFormView):
class BaseLiveFSEditView(LaunchpadEditFormView):
-
schema = ILiveFSEditSchema
next_url = None
diff --git a/lib/lp/soyuz/browser/sourceslist.py b/lib/lp/soyuz/browser/sourceslist.py
index 2552de7..a7f3119 100644
--- a/lib/lp/soyuz/browser/sourceslist.py
+++ b/lib/lp/soyuz/browser/sourceslist.py
@@ -117,7 +117,6 @@ class SourcesListEntriesView(LaunchpadView):
)
if version_number is not None:
-
# Finally, check if this version is one of the available
# distroseries for this archive:
for term in self.terms:
diff --git a/lib/lp/soyuz/browser/tests/test_archive.py b/lib/lp/soyuz/browser/tests/test_archive.py
index b2fd564..2e43af9 100644
--- a/lib/lp/soyuz/browser/tests/test_archive.py
+++ b/lib/lp/soyuz/browser/tests/test_archive.py
@@ -25,7 +25,6 @@ from lp.testing.views import create_initialized_view
class TestArchiveIndexView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_index_page_without_packages(self):
@@ -49,7 +48,6 @@ class TestArchiveIndexView(TestCaseWithFactory):
class TestArchiveEditView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -197,7 +195,6 @@ class TestArchiveEditView(TestCaseWithFactory):
class TestArchiveCopyPackagesView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_query_count(self):
diff --git a/lib/lp/soyuz/browser/tests/test_archive_admin_view.py b/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
index fe9cd31..2c8ff28 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_admin_view.py
@@ -15,7 +15,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestArchiveAdminView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/browser/tests/test_archive_packages.py b/lib/lp/soyuz/browser/tests/test_archive_packages.py
index 68ea7b1..81b9586 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_packages.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_packages.py
@@ -107,7 +107,6 @@ class TestP3APackages(TestCaseWithFactory):
class TestPPAPackages(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def getPackagesView(self, query_string=None):
@@ -408,7 +407,6 @@ class TestPPAPackages(TestCaseWithFactory):
class TestPPAPackagesJobNotifications(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -611,7 +609,6 @@ class TestPPAPackagesJobNotifications(TestCaseWithFactory):
class TestP3APackagesQueryCount(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/browser/tests/test_archive_webservice.py b/lib/lp/soyuz/browser/tests/test_archive_webservice.py
index 47ed467..7599bcf 100644
--- a/lib/lp/soyuz/browser/tests/test_archive_webservice.py
+++ b/lib/lp/soyuz/browser/tests/test_archive_webservice.py
@@ -321,7 +321,6 @@ class TestSigningKey(TestCaseWithFactory):
class TestExternalDependencies(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_external_dependencies_random_user(self):
@@ -406,7 +405,6 @@ class TestExternalDependencies(TestCaseWithFactory):
class TestArchiveDependencies(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_addArchiveDependency_random_user(self):
diff --git a/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
index 2b901f7..1533b4a 100644
--- a/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_distributionsourcepackagerelease.py
@@ -17,7 +17,6 @@ from lp.testing.views import create_initialized_view
class TestDistributionSourcePackageReleaseNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUpLatestBuildTests(self):
diff --git a/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py b/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
index 65ac30e..010f340 100644
--- a/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
+++ b/lib/lp/soyuz/browser/tests/test_distroarchseries_view.py
@@ -9,7 +9,6 @@ from lp.testing.sampledata import LAUNCHPAD_ADMIN
class TestDistroArchSeriesView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/browser/tests/test_livefs.py b/lib/lp/soyuz/browser/tests/test_livefs.py
index 6925033..b2c1194 100644
--- a/lib/lp/soyuz/browser/tests/test_livefs.py
+++ b/lib/lp/soyuz/browser/tests/test_livefs.py
@@ -48,7 +48,6 @@ from lp.testing.views import create_initialized_view
class TestLiveFSNavigation(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -141,7 +140,6 @@ class TestLiveFSNavigation(TestCaseWithFactory):
class TestLiveFSViewsFeatureFlag(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_feature_flag_disabled(self):
@@ -156,7 +154,6 @@ class TestLiveFSViewsFeatureFlag(TestCaseWithFactory):
class TestLiveFSAddView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -257,7 +254,6 @@ class TestLiveFSAddView(BrowserTestCase):
class TestLiveFSAdminView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -321,7 +317,6 @@ class TestLiveFSAdminView(BrowserTestCase):
class TestLiveFSEditView(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -421,7 +416,6 @@ class TestLiveFSEditView(BrowserTestCase):
class TestLiveFSDeleteView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -481,7 +475,6 @@ class TestLiveFSDeleteView(BrowserTestCase):
class TestLiveFSView(BrowserTestCase):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/browser/tests/test_livefsbuild.py b/lib/lp/soyuz/browser/tests/test_livefsbuild.py
index 311cea1..b7f05bd 100644
--- a/lib/lp/soyuz/browser/tests/test_livefsbuild.py
+++ b/lib/lp/soyuz/browser/tests/test_livefsbuild.py
@@ -36,7 +36,6 @@ from lp.testing.views import create_initialized_view
class TestCanonicalUrlForLiveFSBuild(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -68,7 +67,6 @@ class TestCanonicalUrlForLiveFSBuild(TestCaseWithFactory):
class TestLiveFSBuildView(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
@@ -112,7 +110,6 @@ class TestLiveFSBuildView(TestCaseWithFactory):
class TestLiveFSBuildOperations(BrowserTestCase):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py b/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py
index 4bf4496..1151c37 100644
--- a/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py
+++ b/lib/lp/soyuz/browser/tests/test_personal_archive_subscription.py
@@ -18,7 +18,6 @@ from lp.testing.views import create_initialized_view
class TestPersonArchiveSubscriptionView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_personal_archive_subscription_adapts_to_privacy(self):
diff --git a/lib/lp/soyuz/browser/tests/test_publishing_webservice.py b/lib/lp/soyuz/browser/tests/test_publishing_webservice.py
index 008ce4a..2aee350 100644
--- a/lib/lp/soyuz/browser/tests/test_publishing_webservice.py
+++ b/lib/lp/soyuz/browser/tests/test_publishing_webservice.py
@@ -29,7 +29,6 @@ from lp.testing.pages import webservice_for_person
class SourcePackagePublishingHistoryWebserviceTests(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def make_spph_for(self, person):
@@ -166,7 +165,6 @@ class SourcePackagePublishingHistoryWebserviceTests(TestCaseWithFactory):
class BinaryPackagePublishingHistoryWebserviceTests(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def make_bpph_for(self, person):
diff --git a/lib/lp/soyuz/browser/tests/test_queue.py b/lib/lp/soyuz/browser/tests/test_queue.py
index 1234756..865df31 100644
--- a/lib/lp/soyuz/browser/tests/test_queue.py
+++ b/lib/lp/soyuz/browser/tests/test_queue.py
@@ -546,7 +546,6 @@ class TestQueueItemsView(TestCaseWithFactory):
class TestCompletePackageUpload(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makeCompletePackageUpload(
diff --git a/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py b/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
index 5a7538b..6be7098 100644
--- a/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
+++ b/lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py
@@ -14,7 +14,6 @@ from lp.testing.views import create_initialized_view
class TestSourcePackageReleaseView(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/enums.py b/lib/lp/soyuz/enums.py
index bb48ccd..be67db0 100644
--- a/lib/lp/soyuz/enums.py
+++ b/lib/lp/soyuz/enums.py
@@ -868,7 +868,6 @@ class IndexCompressionType(DBEnumeratedType):
class DistroArchSeriesFilterSense(DBEnumeratedType):
-
INCLUDE = DBItem(
1,
"""
diff --git a/lib/lp/soyuz/interfaces/archive.py b/lib/lp/soyuz/interfaces/archive.py
index f824ceb..e1521ce 100644
--- a/lib/lp/soyuz/interfaces/archive.py
+++ b/lib/lp/soyuz/interfaces/archive.py
@@ -469,7 +469,6 @@ class IArchivePublic(IPrivacy, IHasOwner):
class IArchiveSubscriberView(Interface):
-
archive_url = Attribute("External archive URL.")
dependencies = exported(
CollectionField(
diff --git a/lib/lp/soyuz/interfaces/distributionjob.py b/lib/lp/soyuz/interfaces/distributionjob.py
index 76d6340..79b35ae 100644
--- a/lib/lp/soyuz/interfaces/distributionjob.py
+++ b/lib/lp/soyuz/interfaces/distributionjob.py
@@ -55,7 +55,6 @@ class IDistributionJob(Interface):
class DistributionJobType(DBEnumeratedType):
-
INITIALIZE_SERIES = DBItem(
1,
"""
diff --git a/lib/lp/soyuz/interfaces/distributionsourcepackagecache.py b/lib/lp/soyuz/interfaces/distributionsourcepackagecache.py
index ad6aa35..a93c25c 100644
--- a/lib/lp/soyuz/interfaces/distributionsourcepackagecache.py
+++ b/lib/lp/soyuz/interfaces/distributionsourcepackagecache.py
@@ -11,7 +11,6 @@ from zope.interface import Attribute, Interface
class IDistributionSourcePackageCache(Interface):
-
archive = Attribute("The cache target archive.")
distribution = Attribute("The cache target distribution.")
sourcepackagename = Attribute("The source package name.")
diff --git a/lib/lp/soyuz/interfaces/distroarchseriesbinarypackage.py b/lib/lp/soyuz/interfaces/distroarchseriesbinarypackage.py
index dc54722..f3576e7 100644
--- a/lib/lp/soyuz/interfaces/distroarchseriesbinarypackage.py
+++ b/lib/lp/soyuz/interfaces/distroarchseriesbinarypackage.py
@@ -17,7 +17,6 @@ from lp.registry.interfaces.distributionsourcepackage import (
class IDistroArchSeriesBinaryPackage(Interface):
-
distroarchseries = Attribute("The distribution architecture series.")
binarypackagename = Attribute("The binary package name.")
diff --git a/lib/lp/soyuz/interfaces/distroseriespackagecache.py b/lib/lp/soyuz/interfaces/distroseriespackagecache.py
index f304964..df4c4c6 100644
--- a/lib/lp/soyuz/interfaces/distroseriespackagecache.py
+++ b/lib/lp/soyuz/interfaces/distroseriespackagecache.py
@@ -11,7 +11,6 @@ from zope.interface import Attribute, Interface
class IDistroSeriesPackageCache(Interface):
-
archive = Attribute("The cache target archive.")
distroseries = Attribute("The cache target distroseries.")
binarypackagename = Attribute("The binary package name.")
diff --git a/lib/lp/soyuz/interfaces/packagecopyjob.py b/lib/lp/soyuz/interfaces/packagecopyjob.py
index 1e65de6..fa323f9 100644
--- a/lib/lp/soyuz/interfaces/packagecopyjob.py
+++ b/lib/lp/soyuz/interfaces/packagecopyjob.py
@@ -115,7 +115,6 @@ class IPackageCopyJob(IPackageCopyJobPublic, IPackageCopyJobEdit):
class PackageCopyJobType(DBEnumeratedType):
-
PLAIN = DBItem(
1,
"""
diff --git a/lib/lp/soyuz/mail/binarypackagebuild.py b/lib/lp/soyuz/mail/binarypackagebuild.py
index f651a98..3124676 100644
--- a/lib/lp/soyuz/mail/binarypackagebuild.py
+++ b/lib/lp/soyuz/mail/binarypackagebuild.py
@@ -65,7 +65,6 @@ class BinaryPackageBuildRecipientReason(RecipientReason):
class BinaryPackageBuildMailer(BaseMailer):
-
app = "soyuz"
@classmethod
diff --git a/lib/lp/soyuz/mail/livefsbuild.py b/lib/lp/soyuz/mail/livefsbuild.py
index 1a4019d..30d332e 100644
--- a/lib/lp/soyuz/mail/livefsbuild.py
+++ b/lib/lp/soyuz/mail/livefsbuild.py
@@ -12,7 +12,6 @@ from lp.services.webapp import canonical_url
class LiveFSBuildMailer(BaseMailer):
-
app = "soyuz"
@classmethod
diff --git a/lib/lp/soyuz/mail/packageupload.py b/lib/lp/soyuz/mail/packageupload.py
index 7ed646a..1bcd8be 100644
--- a/lib/lp/soyuz/mail/packageupload.py
+++ b/lib/lp/soyuz/mail/packageupload.py
@@ -317,7 +317,6 @@ def build_summary(spr, files, action):
class PackageUploadMailer(BaseMailer):
-
app = "soyuz"
@classmethod
diff --git a/lib/lp/soyuz/mail/tests/test_packageupload.py b/lib/lp/soyuz/mail/tests/test_packageupload.py
index d9200c9..4e5ab2c 100644
--- a/lib/lp/soyuz/mail/tests/test_packageupload.py
+++ b/lib/lp/soyuz/mail/tests/test_packageupload.py
@@ -28,7 +28,6 @@ from lp.testing.mail_helpers import pop_notifications
class TestNotificationRequiringLibrarian(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_mail_from_unicode_names(self):
@@ -288,7 +287,6 @@ class TestNotificationRequiringLibrarian(TestCaseWithFactory):
class TestNotification(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_fetch_information_changes(self):
diff --git a/lib/lp/soyuz/model/archivejob.py b/lib/lp/soyuz/model/archivejob.py
index 0e9ae4d..64df214 100644
--- a/lib/lp/soyuz/model/archivejob.py
+++ b/lib/lp/soyuz/model/archivejob.py
@@ -150,7 +150,6 @@ class ArchiveJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
@implementer(IPackageUploadNotificationJob)
@provider(IPackageUploadNotificationJobSource)
class PackageUploadNotificationJob(ArchiveJobDerived):
-
class_job_type = ArchiveJobType.PACKAGE_UPLOAD_NOTIFICATION
config = config.IPackageUploadNotificationJobSource
@@ -287,7 +286,6 @@ class ScannedArtifact:
@implementer(ICIBuildUploadJob)
@provider(ICIBuildUploadJobSource)
class CIBuildUploadJob(ArchiveJobDerived):
-
class_job_type = ArchiveJobType.CI_BUILD_UPLOAD
user_error_types = (ScanException,)
diff --git a/lib/lp/soyuz/model/archivesubscriber.py b/lib/lp/soyuz/model/archivesubscriber.py
index 39a2202..8a393fa 100644
--- a/lib/lp/soyuz/model/archivesubscriber.py
+++ b/lib/lp/soyuz/model/archivesubscriber.py
@@ -99,7 +99,6 @@ class ArchiveSubscriber(StormBase):
"""See `IArchiveSubscriber`."""
store = Store.of(self)
if self.subscriber.is_team:
-
# We get all the people who already have active tokens for
# this archive (for example, through separate subscriptions).
auth_token = LeftJoin(
diff --git a/lib/lp/soyuz/model/binarypackagebuild.py b/lib/lp/soyuz/model/binarypackagebuild.py
index 797deb2..22351b8 100644
--- a/lib/lp/soyuz/model/binarypackagebuild.py
+++ b/lib/lp/soyuz/model/binarypackagebuild.py
@@ -1204,6 +1204,7 @@ class BinaryPackageBuildSet(SpecificBuildFarmJobSourceMixin):
def getStatusSummaryForBuilds(self, builds):
"""See `IBinaryPackageBuildSet`."""
+
# Create a small helper function to collect the builds for a given
# list of build states:
def collect_builds(*states):
@@ -1511,7 +1512,6 @@ class BinaryPackageBuildSet(SpecificBuildFarmJobSourceMixin):
@implementer(IMacaroonIssuer)
class BinaryPackageBuildMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "binary-package-build"
issuable_via_authserver = True
diff --git a/lib/lp/soyuz/model/distroseriespackagecache.py b/lib/lp/soyuz/model/distroseriespackagecache.py
index 93d3b3e..769e654 100644
--- a/lib/lp/soyuz/model/distroseriespackagecache.py
+++ b/lib/lp/soyuz/model/distroseriespackagecache.py
@@ -186,7 +186,7 @@ class DistroSeriesPackageCache(StormBase):
return
details_map = defaultdict(list)
- for (bpn_id, summary, description, datecreated) in all_details:
+ for bpn_id, summary, description, datecreated in all_details:
bpn = IStore(BinaryPackageName).get(BinaryPackageName, bpn_id)
details_map[bpn].append((summary, description))
diff --git a/lib/lp/soyuz/model/initializedistroseriesjob.py b/lib/lp/soyuz/model/initializedistroseriesjob.py
index 2068ac5..8c7775e 100644
--- a/lib/lp/soyuz/model/initializedistroseriesjob.py
+++ b/lib/lp/soyuz/model/initializedistroseriesjob.py
@@ -33,7 +33,6 @@ from lp.soyuz.scripts.initialize_distroseries import (
@implementer(IInitializeDistroSeriesJob)
@provider(IInitializeDistroSeriesJobSource)
class InitializeDistroSeriesJob(DistributionJobDerived):
-
class_job_type = DistributionJobType.INITIALIZE_SERIES
user_error_types = (InitializationError,)
diff --git a/lib/lp/soyuz/model/livefsbuild.py b/lib/lp/soyuz/model/livefsbuild.py
index 4162636..d4a3396 100644
--- a/lib/lp/soyuz/model/livefsbuild.py
+++ b/lib/lp/soyuz/model/livefsbuild.py
@@ -447,7 +447,6 @@ class LiveFSBuildSet(SpecificBuildFarmJobSourceMixin):
@implementer(IMacaroonIssuer)
class LiveFSBuildMacaroonIssuer(MacaroonIssuerBase):
-
identifier = "livefs-build"
issuable_via_authserver = True
diff --git a/lib/lp/soyuz/model/packagecloner.py b/lib/lp/soyuz/model/packagecloner.py
index 2a87c1d..56bdf29 100644
--- a/lib/lp/soyuz/model/packagecloner.py
+++ b/lib/lp/soyuz/model/packagecloner.py
@@ -56,7 +56,7 @@ class PackageCloner:
# Are we also supposed to clone binary packages from origin to
# destination distroarchseries pairs?
if distroarchseries_list is not None:
- for (origin_das, destination_das) in distroarchseries_list:
+ for origin_das, destination_das in distroarchseries_list:
self._clone_binary_packages(
origin,
destination,
diff --git a/lib/lp/soyuz/model/packagediffjob.py b/lib/lp/soyuz/model/packagediffjob.py
index f4c20ac..794dc99 100644
--- a/lib/lp/soyuz/model/packagediffjob.py
+++ b/lib/lp/soyuz/model/packagediffjob.py
@@ -26,7 +26,6 @@ from lp.soyuz.interfaces.packagediffjob import (
@delegate_to(IPackageDiffJob)
@provider(IPackageDiffJobSource)
class PackageDiffJobDerived(BaseRunnableJob, metaclass=EnumeratedSubclass):
-
config = config.IPackageDiffJobSource
def __init__(self, job):
diff --git a/lib/lp/soyuz/model/packagetranslationsuploadjob.py b/lib/lp/soyuz/model/packagetranslationsuploadjob.py
index d402b94..ab86d4b 100644
--- a/lib/lp/soyuz/model/packagetranslationsuploadjob.py
+++ b/lib/lp/soyuz/model/packagetranslationsuploadjob.py
@@ -70,7 +70,6 @@ def _filter_ubuntu_translation_file(filename):
class PackageTranslationsUploadJobDerived(
BaseRunnableJob, metaclass=EnumeratedSubclass
):
-
config = config.IPackageTranslationsUploadJobSource
def __init__(self, job):
diff --git a/lib/lp/soyuz/scripts/gina/archive.py b/lib/lp/soyuz/scripts/gina/archive.py
index b33e6bb..48365d0 100644
--- a/lib/lp/soyuz/scripts/gina/archive.py
+++ b/lib/lp/soyuz/scripts/gina/archive.py
@@ -51,7 +51,6 @@ class ArchiveFilesystemInfo:
def __init__(
self, root, distroseries, component, arch=None, source_only=False
):
-
# Holds the distribution information
self.distroseries = distroseries
self.component = component
@@ -224,7 +223,6 @@ class PackagesMap:
# Iterate over ArchComponentItems instance to cover
# all components in all architectures.
for info_set in arch_component_items:
-
# Run over the source stanzas and store info in src_map. We
# make just one source map (instead of one per architecture)
# because most of them are the same for all architectures,
diff --git a/lib/lp/soyuz/scripts/ppakeygenerator.py b/lib/lp/soyuz/scripts/ppakeygenerator.py
index 818c39a..11d3d86 100644
--- a/lib/lp/soyuz/scripts/ppakeygenerator.py
+++ b/lib/lp/soyuz/scripts/ppakeygenerator.py
@@ -19,7 +19,6 @@ from lp.soyuz.interfaces.archive import IArchiveSet
class PPAKeyGenerator(LaunchpadCronScript):
-
usage = "%prog [-A archive-reference]"
description = "Generate a GPG signing key for PPAs."
diff --git a/lib/lp/soyuz/scripts/ppareport.py b/lib/lp/soyuz/scripts/ppareport.py
index eb43b60..9db43c2 100644
--- a/lib/lp/soyuz/scripts/ppareport.py
+++ b/lib/lp/soyuz/scripts/ppareport.py
@@ -31,7 +31,6 @@ from lp.soyuz.model.publishing import SourcePackagePublishingHistory
class PPAReportScript(LaunchpadScript):
-
description = "PPA report tool."
output = None
diff --git a/lib/lp/soyuz/scripts/retrydepwait.py b/lib/lp/soyuz/scripts/retrydepwait.py
index 9b87aeb..45cfeb0 100644
--- a/lib/lp/soyuz/scripts/retrydepwait.py
+++ b/lib/lp/soyuz/scripts/retrydepwait.py
@@ -21,7 +21,6 @@ from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
class RetryDepwaitTunableLoop(TunableLoop):
-
# We don't write too much, and it's important that we're timely.
# Ignore the replication lag and long transaction checks by using a
# basic LoopTuner.
diff --git a/lib/lp/soyuz/scripts/tests/test_copypackage.py b/lib/lp/soyuz/scripts/tests/test_copypackage.py
index 03fb1a5..b2bb41c 100644
--- a/lib/lp/soyuz/scripts/tests/test_copypackage.py
+++ b/lib/lp/soyuz/scripts/tests/test_copypackage.py
@@ -948,7 +948,6 @@ class CopyCheckerDifferentArchiveHarness(
class CopyCheckerTestCase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -1224,7 +1223,6 @@ class CopyCheckerTestCase(TestCaseWithFactory):
class BaseDoCopyTests:
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/soyuz/scripts/tests/test_gina.py b/lib/lp/soyuz/scripts/tests/test_gina.py
index 967d917..be26f78 100644
--- a/lib/lp/soyuz/scripts/tests/test_gina.py
+++ b/lib/lp/soyuz/scripts/tests/test_gina.py
@@ -57,7 +57,6 @@ class FakePackagesMap:
class TestGina(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def assertPublishingStates(self, spphs, states):
@@ -272,7 +271,6 @@ class TestArchiveFilesystemInfo(TestCase):
class TestSourcePackageData(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_unpack_dsc_with_vendor(self):
@@ -459,7 +457,6 @@ class TestSourcePackageData(TestCaseWithFactory):
class TestSourcePackageHandler(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_user_defined_fields(self):
@@ -508,7 +505,6 @@ class TestSourcePackageHandler(TestCaseWithFactory):
class TestSourcePackagePublisher(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_publish_creates_published_publication(self):
@@ -537,7 +533,6 @@ class TestSourcePackagePublisher(TestCaseWithFactory):
class TestBinaryPackageData(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_checksum_fields(self):
@@ -565,7 +560,6 @@ class TestBinaryPackageData(TestCaseWithFactory):
class TestBinaryPackageHandler(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_user_defined_fields(self):
@@ -695,7 +689,6 @@ class TestBinaryPackageHandler(TestCaseWithFactory):
class TestBinaryPackagePublisher(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_publish_creates_published_publication(self):
@@ -729,7 +722,6 @@ class TestBinaryPackagePublisher(TestCaseWithFactory):
class TestRunner(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_import_sourcepackages_skip(self):
diff --git a/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py b/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py
index 8c68fc0..aee00cb 100644
--- a/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py
+++ b/lib/lp/soyuz/scripts/tests/test_initialize_distroseries.py
@@ -261,7 +261,6 @@ class InitializationHelperTestCase(TestCaseWithFactory):
class TestInitializeDistroSeries(InitializationHelperTestCase):
-
layer = LaunchpadZopelessLayer
def test_failure_for_already_released_distroseries(self):
diff --git a/lib/lp/soyuz/scripts/tests/test_retrydepwait.py b/lib/lp/soyuz/scripts/tests/test_retrydepwait.py
index ccbb008..43bbc9f 100644
--- a/lib/lp/soyuz/scripts/tests/test_retrydepwait.py
+++ b/lib/lp/soyuz/scripts/tests/test_retrydepwait.py
@@ -19,7 +19,6 @@ from lp.testing.script import run_script
class TestRetryDepwait(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py b/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py
index 5560b57..c5e5c4d 100644
--- a/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py
+++ b/lib/lp/soyuz/scripts/tests/test_update_pkgcache.py
@@ -17,7 +17,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
# XXX cjwatson 2022-04-01: Most functional tests currently live in
# lib/lp/soyuz/doc/package-cache-script.rst, but should be moved here.
class TestPackageCacheUpdater(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
dbuser = "update-pkg-cache"
diff --git a/lib/lp/soyuz/tests/test_archive.py b/lib/lp/soyuz/tests/test_archive.py
index 7b70768..a72d9b7 100644
--- a/lib/lp/soyuz/tests/test_archive.py
+++ b/lib/lp/soyuz/tests/test_archive.py
@@ -147,7 +147,6 @@ from lp.testing.views import create_webservice_error_view
class TestGetPublicationsInArchive(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeArchivesForOneDistribution(self, count=3):
@@ -279,7 +278,6 @@ class TestGetPublicationsInArchive(TestCaseWithFactory):
class TestArchiveRepositorySize(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_empty_ppa_has_zero_binaries_size(self):
@@ -2136,7 +2134,6 @@ class TestBuildDebugSymbols(TestCaseWithFactory):
class TestAddArchiveDependencies(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_add_hidden_dependency(self):
@@ -2207,7 +2204,6 @@ class TestAddArchiveDependencies(TestCaseWithFactory):
class TestArchiveDependencies(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
run_tests_with = AsynchronousDeferredRunTestForBrokenTwisted.make_factory(
timeout=30
@@ -2514,7 +2510,6 @@ class TestFindDepCandidates(TestCaseWithFactory):
class TestOverlays(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
@@ -2650,7 +2645,6 @@ class TestOverlays(TestCaseWithFactory):
class TestComponents(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_no_components_for_arbitrary_person(self):
@@ -2674,7 +2668,6 @@ class TestComponents(TestCaseWithFactory):
class TestPockets(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_no_pockets_for_arbitrary_person(self):
@@ -2699,7 +2692,6 @@ class TestPockets(TestCaseWithFactory):
class TestValidatePPA(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -2919,7 +2911,6 @@ class TestDefaultComponent(TestCaseWithFactory):
class TestGetPockets(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_getPockets_for_other_archives(self):
@@ -3210,7 +3201,6 @@ class TestGetSourceFileByName(TestCaseWithFactory):
class TestGetPoolFileByPath(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_file_name_too_short(self):
@@ -3591,7 +3581,6 @@ class TestGetPoolFileByPath(TestCaseWithFactory):
class TestGetPublishedSources(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_getPublishedSources_comprehensive(self):
@@ -3850,7 +3839,6 @@ class TestGetPublishedSources(TestCaseWithFactory):
class TestGetPublishedSourcesWebService(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def createTestingPPA(self):
@@ -3905,7 +3893,6 @@ class TestGetPublishedSourcesWebService(TestCaseWithFactory):
class TestCopyPackage(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def _setup_copy_data(
@@ -4968,7 +4955,6 @@ class TestCopyPackage(TestCaseWithFactory):
class TestUploadCIBuild(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeCIBuild(self, distribution, **kwargs):
@@ -5098,7 +5084,6 @@ class TestUploadCIBuild(TestCaseWithFactory):
class TestgetAllPublishedBinaries(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_returns_publication(self):
@@ -5225,7 +5210,6 @@ class TestgetAllPublishedBinaries(TestCaseWithFactory):
class TestRemovingPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_remove_permission_is_none(self):
@@ -5237,7 +5221,6 @@ class TestRemovingPermissions(TestCaseWithFactory):
class TestRemovingCopyNotifications(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeJob(self):
@@ -5306,7 +5289,6 @@ class TestRemovingCopyNotifications(TestCaseWithFactory):
class TestPublishFlag(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_primary_archive_published_by_default(self):
@@ -5327,7 +5309,6 @@ class TestPublishFlag(TestCaseWithFactory):
class TestPPANaming(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_unique_copy_archive_name(self):
@@ -5400,7 +5381,6 @@ class TestPPANaming(TestCaseWithFactory):
class TestGetPPAOwnedByPerson(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -5471,7 +5451,6 @@ class TestGetPPAOwnedByPerson(TestCaseWithFactory):
class TestPPALookup(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -5521,7 +5500,6 @@ class TestPPALookup(TestCaseWithFactory):
class TestArchiveReference(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertReferenceIntegrity(self, reference, archive):
@@ -5570,7 +5548,6 @@ class TestArchiveReference(TestCaseWithFactory):
class TestArchiveSetGetByReference(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -5747,7 +5724,6 @@ class TestArchiveSetGetByReference(TestCaseWithFactory):
class TestArchiveSetCheckViewPermission(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -5897,7 +5873,6 @@ class TestArchiveSetCheckViewPermission(TestCaseWithFactory):
class TestDisplayName(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_default(self):
@@ -6126,7 +6101,6 @@ class TestGetSigningKeyData(TestCaseWithFactory):
class TestCountersAndSummaries(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_cprov_build_counters_in_sampledata(self):
@@ -6769,7 +6743,6 @@ class TestArchiveGetOverridePolicy(TestCaseWithFactory):
class TestMarkSuiteDirty(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_default_is_none(self):
@@ -6858,7 +6831,6 @@ class TestMarkSuiteDirty(TestCaseWithFactory):
class TestArchivePermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_archive_owner_does_not_have_admin(self):
diff --git a/lib/lp/soyuz/tests/test_archive_agent.py b/lib/lp/soyuz/tests/test_archive_agent.py
index 15d1e2d..d0ca92e 100644
--- a/lib/lp/soyuz/tests/test_archive_agent.py
+++ b/lib/lp/soyuz/tests/test_archive_agent.py
@@ -16,7 +16,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestSoftwareCenterAgent(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_getArchiveSubscriptionURL(self):
diff --git a/lib/lp/soyuz/tests/test_archive_privacy.py b/lib/lp/soyuz/tests/test_archive_privacy.py
index 581bf64..a514ec1 100644
--- a/lib/lp/soyuz/tests/test_archive_privacy.py
+++ b/lib/lp/soyuz/tests/test_archive_privacy.py
@@ -17,7 +17,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, LaunchpadZopelessLayer
class TestArchivePrivacy(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_no_subscription(self):
@@ -64,7 +63,6 @@ class TestArchivePrivacy(TestCaseWithFactory):
class TestPrivacySwitching(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_switch_privacy_no_pubs_succeeds(self):
diff --git a/lib/lp/soyuz/tests/test_archive_subscriptions.py b/lib/lp/soyuz/tests/test_archive_subscriptions.py
index 7f7fe47..b815a3d 100644
--- a/lib/lp/soyuz/tests/test_archive_subscriptions.py
+++ b/lib/lp/soyuz/tests/test_archive_subscriptions.py
@@ -193,7 +193,6 @@ class PrivateArtifactsViewTestCase(BrowserTestCase):
class PersonArchiveSubscriptions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_query_count(self):
diff --git a/lib/lp/soyuz/tests/test_archivefile.py b/lib/lp/soyuz/tests/test_archivefile.py
index 85d006f..23b2f49 100644
--- a/lib/lp/soyuz/tests/test_archivefile.py
+++ b/lib/lp/soyuz/tests/test_archivefile.py
@@ -33,7 +33,6 @@ def read_library_file(library_file):
class TestArchiveFile(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_new(self):
diff --git a/lib/lp/soyuz/tests/test_archivejob.py b/lib/lp/soyuz/tests/test_archivejob.py
index 623c7cb..a29fc89 100644
--- a/lib/lp/soyuz/tests/test_archivejob.py
+++ b/lib/lp/soyuz/tests/test_archivejob.py
@@ -58,7 +58,6 @@ from lp.testing.mail_helpers import pop_notifications
class TestArchiveJob(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_instantiate(self):
@@ -84,7 +83,6 @@ class TestArchiveJob(TestCaseWithFactory):
class TestArchiveJobDerived(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_create_explodes(self):
@@ -95,7 +93,6 @@ class TestArchiveJobDerived(TestCaseWithFactory):
class TestPackageUploadNotificationJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_getOopsVars(self):
@@ -164,7 +161,6 @@ class TestPackageUploadNotificationJob(TestCaseWithFactory):
class TestCIBuildUploadJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makeCIBuild(self, distribution, **kwargs):
@@ -1729,7 +1725,6 @@ class TestCIBuildUploadJob(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_PackageUploadNotificationJob(self):
diff --git a/lib/lp/soyuz/tests/test_binarypackagebuild.py b/lib/lp/soyuz/tests/test_binarypackagebuild.py
index ae7c116..89c02e6 100644
--- a/lib/lp/soyuz/tests/test_binarypackagebuild.py
+++ b/lib/lp/soyuz/tests/test_binarypackagebuild.py
@@ -59,7 +59,6 @@ from lp.xmlrpc.interfaces import IPrivateApplication
class TestBinaryPackageBuild(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -236,7 +235,6 @@ class TestBinaryPackageBuild(TestCaseWithFactory):
class TestBuildUpdateDependencies(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def _setupSimpleDepwaitContext(self):
@@ -425,7 +423,6 @@ class TestBuildUpdateDependencies(TestCaseWithFactory):
class BaseTestCaseWithThreeBuilds(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -457,7 +454,6 @@ class BaseTestCaseWithThreeBuilds(TestCaseWithFactory):
class TestBuildSet(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_getByBuildFarmJob_works(self):
@@ -706,7 +702,6 @@ class TestBinaryPackageBuildWebservice(TestCaseWithFactory):
class TestPostprocessCandidate(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeBuildJob(self, pocket="RELEASE"):
@@ -745,7 +740,6 @@ class TestPostprocessCandidate(TestCaseWithFactory):
class TestCalculateScore(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def makeBuild(
diff --git a/lib/lp/soyuz/tests/test_binarypackagename.py b/lib/lp/soyuz/tests/test_binarypackagename.py
index a29c8a1..8875c56 100644
--- a/lib/lp/soyuz/tests/test_binarypackagename.py
+++ b/lib/lp/soyuz/tests/test_binarypackagename.py
@@ -13,7 +13,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestBinaryPackageNameSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_binarysourcereference.py b/lib/lp/soyuz/tests/test_binarysourcereference.py
index 8d4817f..4b50b7c 100644
--- a/lib/lp/soyuz/tests/test_binarysourcereference.py
+++ b/lib/lp/soyuz/tests/test_binarysourcereference.py
@@ -20,7 +20,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestBinarySourceReference(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_build.py b/lib/lp/soyuz/tests/test_build.py
index b7b9e09..8ee97c4 100644
--- a/lib/lp/soyuz/tests/test_build.py
+++ b/lib/lp/soyuz/tests/test_build.py
@@ -27,7 +27,6 @@ from lp.testing.sampledata import ADMIN_EMAIL
class TestBuild(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_build_depwait.py b/lib/lp/soyuz/tests/test_build_depwait.py
index 9a74996..e16ae32 100644
--- a/lib/lp/soyuz/tests/test_build_depwait.py
+++ b/lib/lp/soyuz/tests/test_build_depwait.py
@@ -15,7 +15,6 @@ from lp.testing.sampledata import ADMIN_EMAIL
class TestBuildDepWait(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_build_notify.py b/lib/lp/soyuz/tests/test_build_notify.py
index 6c5cdb7..7813c4f 100644
--- a/lib/lp/soyuz/tests/test_build_notify.py
+++ b/lib/lp/soyuz/tests/test_build_notify.py
@@ -41,7 +41,6 @@ REASONS = {
class TestBuildNotify(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_build_privacy.py b/lib/lp/soyuz/tests/test_build_privacy.py
index 39b6176..1e50845 100644
--- a/lib/lp/soyuz/tests/test_build_privacy.py
+++ b/lib/lp/soyuz/tests/test_build_privacy.py
@@ -13,7 +13,6 @@ from lp.testing.sampledata import ADMIN_EMAIL
class TestBuildPrivacy(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_build_set.py b/lib/lp/soyuz/tests/test_build_set.py
index c7dd604..7f14271 100644
--- a/lib/lp/soyuz/tests/test_build_set.py
+++ b/lib/lp/soyuz/tests/test_build_set.py
@@ -32,7 +32,6 @@ from lp.testing.sampledata import ADMIN_EMAIL
class TestBuildSet(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_build_start_estimation.py b/lib/lp/soyuz/tests/test_build_start_estimation.py
index 06a1bf9..4146664 100644
--- a/lib/lp/soyuz/tests/test_build_start_estimation.py
+++ b/lib/lp/soyuz/tests/test_build_start_estimation.py
@@ -15,7 +15,6 @@ from lp.testing.sampledata import ADMIN_EMAIL, BOB_THE_BUILDER_NAME
class TestBuildStartEstimation(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_distroarchseriesfilter.py b/lib/lp/soyuz/tests/test_distroarchseriesfilter.py
index 2f11751..02c87e3 100644
--- a/lib/lp/soyuz/tests/test_distroarchseriesfilter.py
+++ b/lib/lp/soyuz/tests/test_distroarchseriesfilter.py
@@ -19,7 +19,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, ZopelessDatabaseLayer
class TestDistroArchSeriesFilter(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_implements_interfaces(self):
@@ -81,7 +80,6 @@ class TestDistroArchSeriesFilter(TestCaseWithFactory):
class TestDistroArchSeriesFilterSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def test_class_implements_interface(self):
diff --git a/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py b/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
index 6b76c6f..f0263b3 100644
--- a/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
+++ b/lib/lp/soyuz/tests/test_distroseriesbinarypackage.py
@@ -21,7 +21,6 @@ from lp.testing.matchers import HasQueryCount
class TestDistroSeriesBinaryPackage(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
index b0a2e63..39f0ef9 100644
--- a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
+++ b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
@@ -690,7 +690,6 @@ class TestDistroSeriesDifferenceJobSource(TestCaseWithFactory):
class TestDistroSeriesDifferenceJobEndToEnd(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -1086,7 +1085,6 @@ class TestDistroSeriesDifferenceJobPermissions(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_DerivedDistroseriesDifferenceJob(self):
diff --git a/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py b/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
index cf6e0fd..6c38b8f 100644
--- a/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
+++ b/lib/lp/soyuz/tests/test_distroseriesqueue_rosetta_translations.py
@@ -42,7 +42,6 @@ from lp.translations.scripts.po_import import TranslationsImport
class TestDistroSeriesQueueRosettaTranslationsTarball(
TestNativePublishingBase
):
-
layer = LaunchpadZopelessLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_initializedistroseriesjob.py b/lib/lp/soyuz/tests/test_initializedistroseriesjob.py
index 4f5b0d7..2ba33a2 100644
--- a/lib/lp/soyuz/tests/test_initializedistroseriesjob.py
+++ b/lib/lp/soyuz/tests/test_initializedistroseriesjob.py
@@ -409,7 +409,6 @@ class InitializeDistroSeriesJobTestsWithPackages(TestCaseWithFactory):
class TestViaCelery(TestCaseWithFactory):
-
layer = CeleryJobLayer
def test_job(self):
diff --git a/lib/lp/soyuz/tests/test_livefs.py b/lib/lp/soyuz/tests/test_livefs.py
index 93ae067..7f98b2f 100644
--- a/lib/lp/soyuz/tests/test_livefs.py
+++ b/lib/lp/soyuz/tests/test_livefs.py
@@ -56,7 +56,6 @@ from lp.testing.pages import webservice_for_person
class TestLiveFSFeatureFlag(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_feature_flag_disabled(self):
@@ -75,7 +74,6 @@ class TestLiveFSFeatureFlag(TestCaseWithFactory):
class TestLiveFS(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -558,7 +556,6 @@ class TestLiveFS(TestCaseWithFactory):
class TestLiveFSSet(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -668,7 +665,6 @@ class TestLiveFSSet(TestCaseWithFactory):
class TestLiveFSWebservice(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_livefsbuild.py b/lib/lp/soyuz/tests/test_livefsbuild.py
index 8e0477e..f3b5cac 100644
--- a/lib/lp/soyuz/tests/test_livefsbuild.py
+++ b/lib/lp/soyuz/tests/test_livefsbuild.py
@@ -63,7 +63,6 @@ from lp.xmlrpc.interfaces import IPrivateApplication
class TestLiveFSBuildFeatureFlag(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def test_feature_flag_disabled(self):
@@ -100,7 +99,6 @@ expected_body = """\
class TestLiveFSBuild(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -427,7 +425,6 @@ class TestLiveFSBuild(TestCaseWithFactory):
class TestLiveFSBuildSet(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def setUp(self):
@@ -465,7 +462,6 @@ class TestLiveFSBuildSet(TestCaseWithFactory):
class TestLiveFSBuildWebservice(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
index 4a32827..fabff3d 100644
--- a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
+++ b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
@@ -48,7 +48,6 @@ from lp.testing.layers import ZopelessDatabaseLayer
class TestLiveFSBuildBehaviourBase(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -183,7 +182,6 @@ class TestLiveFSBuildBehaviour(TestLiveFSBuildBehaviourBase):
class TestAsyncLiveFSBuildBehaviour(TestLiveFSBuildBehaviourBase):
-
run_tests_with = AsynchronousDeferredRunTest.make_factory(timeout=30)
@defer.inlineCallbacks
diff --git a/lib/lp/soyuz/tests/test_packagecloner.py b/lib/lp/soyuz/tests/test_packagecloner.py
index 12a2641..3be637f 100644
--- a/lib/lp/soyuz/tests/test_packagecloner.py
+++ b/lib/lp/soyuz/tests/test_packagecloner.py
@@ -35,7 +35,6 @@ class PackageInfo:
class PackageClonerTests(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def checkCopiedSources(self, archive, distroseries, expected):
diff --git a/lib/lp/soyuz/tests/test_packagecopyjob.py b/lib/lp/soyuz/tests/test_packagecopyjob.py
index f4d2e53..ee426a4 100644
--- a/lib/lp/soyuz/tests/test_packagecopyjob.py
+++ b/lib/lp/soyuz/tests/test_packagecopyjob.py
@@ -2340,7 +2340,6 @@ class TestViaCelery(TestCaseWithFactory):
class TestPlainPackageCopyJobPermissions(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_extendMetadata_edit_privilege_by_queue_admin(self):
diff --git a/lib/lp/soyuz/tests/test_packagediffjob.py b/lib/lp/soyuz/tests/test_packagediffjob.py
index b3d9b2c..84f0947 100644
--- a/lib/lp/soyuz/tests/test_packagediffjob.py
+++ b/lib/lp/soyuz/tests/test_packagediffjob.py
@@ -24,7 +24,6 @@ from lp.testing.layers import CeleryJobLayer, LaunchpadZopelessLayer
class TestPackageDiffJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
def makeJob(self):
diff --git a/lib/lp/soyuz/tests/test_packageset.py b/lib/lp/soyuz/tests/test_packageset.py
index cfeb56f..cab876a 100644
--- a/lib/lp/soyuz/tests/test_packageset.py
+++ b/lib/lp/soyuz/tests/test_packageset.py
@@ -28,7 +28,6 @@ from lp.testing.layers import DatabaseFunctionalLayer, ZopelessDatabaseLayer
class TestPackagesetSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -237,7 +236,6 @@ class TestPackagesetSet(TestCaseWithFactory):
class TestPackagesetSetPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -271,7 +269,6 @@ class TestPackagesetSetPermissions(TestCaseWithFactory):
class TestPackageset(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -725,7 +722,6 @@ class TestPackageset(TestCaseWithFactory):
class TestPackagesetPermissions(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -792,7 +788,6 @@ class TestPackagesetPermissions(TestCaseWithFactory):
class TestArchivePermissionSet(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
diff --git a/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py b/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py
index 6564fe4..ab6da2a 100644
--- a/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py
+++ b/lib/lp/soyuz/tests/test_packagetranslationsuploadjob.py
@@ -75,7 +75,6 @@ class LocalTestHelper(TestCaseWithFactory):
class TestPackageTranslationsUploadJob(LocalTestHelper):
-
layer = LaunchpadZopelessLayer
def test_job_implements_IPackageTranslationsUploadJob(self):
diff --git a/lib/lp/soyuz/tests/test_packageupload.py b/lib/lp/soyuz/tests/test_packageupload.py
index 7e56c8b..db50c31 100644
--- a/lib/lp/soyuz/tests/test_packageupload.py
+++ b/lib/lp/soyuz/tests/test_packageupload.py
@@ -67,7 +67,6 @@ from lp.testing.matchers import HasQueryCount, Provides
class PackageUploadTestCase(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
dbuser = config.uploadqueue.dbuser
@@ -565,7 +564,6 @@ class TestPackageUploadSecurity(TestCaseWithFactory):
class TestPackageUploadWithPackageCopyJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
dbuser = config.uploadqueue.dbuser
diff --git a/lib/lp/soyuz/tests/test_processacceptedbugsjob.py b/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
index 6ed8b1d..2575a97 100644
--- a/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
+++ b/lib/lp/soyuz/tests/test_processacceptedbugsjob.py
@@ -270,7 +270,6 @@ class TestClosingPrivateBugs(TestCaseWithFactory):
class TestCloseBugIDsForSourcePackageRelease(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
dbuser = config.IProcessAcceptedBugsJobSource.dbuser
@@ -348,7 +347,6 @@ class TestCloseBugIDsForSourcePackageRelease(TestCaseWithFactory):
class TestProcessAcceptedBugsJob(TestCaseWithFactory):
-
layer = LaunchpadZopelessLayer
dbuser = config.IProcessAcceptedBugsJobSource.dbuser
diff --git a/lib/lp/soyuz/tests/test_publishing.py b/lib/lp/soyuz/tests/test_publishing.py
index 2f0bb5d..e9cede9 100644
--- a/lib/lp/soyuz/tests/test_publishing.py
+++ b/lib/lp/soyuz/tests/test_publishing.py
@@ -1128,7 +1128,6 @@ class TestNativePublishing(TestNativePublishingBase):
class PublishingSetTests(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def setUp(self):
@@ -1195,7 +1194,6 @@ class PublishingSetTests(TestCaseWithFactory):
class TestPublishingSetLite(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def setUp(self):
@@ -1892,7 +1890,6 @@ class TestGetBuiltBinaries(TestNativePublishingBase):
class TestGetActiveArchSpecificPublications(TestCaseWithFactory):
-
layer = ZopelessDatabaseLayer
def makeSPR(self):
diff --git a/lib/lp/soyuz/tests/test_publishing_models.py b/lib/lp/soyuz/tests/test_publishing_models.py
index 1c16710..6339b71 100644
--- a/lib/lp/soyuz/tests/test_publishing_models.py
+++ b/lib/lp/soyuz/tests/test_publishing_models.py
@@ -121,7 +121,6 @@ class TestPublishingSet(BaseTestCaseWithThreeBuilds):
class TestSourcePackagePublishingHistory(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_ancestry(self):
@@ -240,7 +239,6 @@ class TestSourcePackagePublishingHistory(TestCaseWithFactory):
class TestBinaryPackagePublishingHistory(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def getURLsForBPPH(self, bpph, include_meta=False):
diff --git a/lib/lp/soyuz/tests/test_sourcepackagerelease.py b/lib/lp/soyuz/tests/test_sourcepackagerelease.py
index c18bb82..d8f47a1 100644
--- a/lib/lp/soyuz/tests/test_sourcepackagerelease.py
+++ b/lib/lp/soyuz/tests/test_sourcepackagerelease.py
@@ -12,7 +12,6 @@ from lp.testing.layers import LaunchpadFunctionalLayer
class TestSourcePackageRelease(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def test_uploader_no_uploader(self):
diff --git a/lib/lp/soyuz/tests/test_vocabularies.py b/lib/lp/soyuz/tests/test_vocabularies.py
index 12989ba..acfdff5 100644
--- a/lib/lp/soyuz/tests/test_vocabularies.py
+++ b/lib/lp/soyuz/tests/test_vocabularies.py
@@ -11,7 +11,6 @@ from lp.testing.layers import DatabaseFunctionalLayer
class TestPPAVocabulary(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def test_toTerm_empty_description(self):
diff --git a/lib/lp/soyuz/tests/test_yuitests.py b/lib/lp/soyuz/tests/test_yuitests.py
index c1df8e1..a936a4c 100644
--- a/lib/lp/soyuz/tests/test_yuitests.py
+++ b/lib/lp/soyuz/tests/test_yuitests.py
@@ -10,7 +10,6 @@ from lp.testing.layers import YUITestLayer
class SoyuzYUIUnitTestCase(YUIUnitTestCase):
-
layer = YUITestLayer
suite_name = "SoyuzYUIUnitTests"
diff --git a/lib/lp/soyuz/vocabularies.py b/lib/lp/soyuz/vocabularies.py
index 2abe4f5..28b654f 100644
--- a/lib/lp/soyuz/vocabularies.py
+++ b/lib/lp/soyuz/vocabularies.py
@@ -36,7 +36,6 @@ from lp.soyuz.model.sourcepackagerelease import SourcePackageRelease
class ComponentVocabulary(StormVocabularyBase):
-
_table = Component
_order_by = "name"
@@ -84,7 +83,6 @@ class PackageReleaseVocabulary(SQLObjectVocabularyBase):
@implementer(IHugeVocabulary)
class PPAVocabulary(SQLObjectVocabularyBase):
-
_table = Archive
_orderBy = ["Person.name, Archive.name"]
_clauseTables = ["Person"]
diff --git a/lib/lp/soyuz/wsgi/tests/test_archiveauth.py b/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
index 9ac81b0..3ac5ff9 100644
--- a/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
+++ b/lib/lp/soyuz/wsgi/tests/test_archiveauth.py
@@ -22,7 +22,6 @@ from lp.xmlrpc import faults
class TestWSGIArchiveAuth(TestCaseWithFactory):
-
layer = ZopelessAppServerLayer
def setUp(self):
diff --git a/lib/lp/soyuz/xmlrpc/tests/test_archive.py b/lib/lp/soyuz/xmlrpc/tests/test_archive.py
index 9287468..6e0577a 100644
--- a/lib/lp/soyuz/xmlrpc/tests/test_archive.py
+++ b/lib/lp/soyuz/xmlrpc/tests/test_archive.py
@@ -35,7 +35,6 @@ def round_to_next_second(dt: datetime) -> datetime:
class TestArchiveAPI(TestCaseWithFactory):
-
layer = LaunchpadFunctionalLayer
def setUp(self):
diff --git a/lib/lp/systemhomes.py b/lib/lp/systemhomes.py
index fc161ff..5080ff5 100644
--- a/lib/lp/systemhomes.py
+++ b/lib/lp/systemhomes.py
@@ -65,7 +65,6 @@ from lp.translations.interfaces.translationsoverview import (
@implementer(IArchiveApplication)
class ArchiveApplication:
-
title = "Archive API"
@@ -85,7 +84,6 @@ class CodeImportSchedulerApplication:
@implementer(IGitApplication)
class GitApplication:
-
title = "Git API"
@@ -357,5 +355,4 @@ class WebServiceApplication(ServiceRootResource):
@implementer(ITestOpenIDApplication)
class TestOpenIDApplication:
-
title = "TestOpenIDApplication"
diff --git a/lib/lp/testing/__init__.py b/lib/lp/testing/__init__.py
index 7bf98a4..a5b8996 100644
--- a/lib/lp/testing/__init__.py
+++ b/lib/lp/testing/__init__.py
@@ -686,7 +686,7 @@ class TestCase(testtools.TestCase, fixtures.TestWithFixtures):
def attachOopses(self):
if len(self.oopses) > 0:
- for (i, report) in enumerate(self.oopses):
+ for i, report in enumerate(self.oopses):
content = Content(
UTF8_TEXT,
partial(
@@ -1072,7 +1072,6 @@ class WebServiceTestCase(TestCaseWithFactory):
class AbstractYUITestCase(TestCase):
-
layer = None # type: Type[BaseLayer]
suite_name = ""
# 30 seconds for the suite.
@@ -1183,7 +1182,6 @@ class AbstractYUITestCase(TestCase):
class YUIUnitTestCase(AbstractYUITestCase):
-
_testMethodName = "checkResults"
def initialize(self, test_path):
diff --git a/lib/lp/testing/breadcrumbs.py b/lib/lp/testing/breadcrumbs.py
index c6c5ad5..226940a 100644
--- a/lib/lp/testing/breadcrumbs.py
+++ b/lib/lp/testing/breadcrumbs.py
@@ -11,7 +11,6 @@ from lp.testing.views import create_initialized_view
class BaseBreadcrumbTestCase(TestCaseWithFactory):
-
layer = DatabaseFunctionalLayer
def assertBreadcrumbs(self, expected, obj, view_name=None, rootsite=None):
diff --git a/lib/lp/testing/keyserver/tests/test_inprocess.py b/lib/lp/testing/keyserver/tests/test_inprocess.py
index 9cb4698..ef0636b 100644
--- a/lib/lp/testing/keyserver/tests/test_inprocess.py
+++ b/lib/lp/testing/keyserver/tests/test_inprocess.py
@@ -18,7 +18,6 @@ from lp.testing.keyserver.web import GREETING
class TestInProcessKeyServerFixture(TestCase):
-
run_tests_with = AsynchronousDeferredRunTestForBrokenTwisted.make_factory(
timeout=30
)
diff --git a/lib/lp/testing/keyserver/tests/test_web.py b/lib/lp/testing/keyserver/tests/test_web.py
index 9a24613..c1c9ef3 100644
--- a/lib/lp/testing/keyserver/tests/test_web.py
+++ b/lib/lp/testing/keyserver/tests/test_web.py
@@ -26,7 +26,6 @@ class RegularCallbackExecuted(Exception):
class TestWebResources(TestCase):
-