Merge ~pelpsi/launchpad:TestOpenIDApplication-does-not-fully-implement-ITestOpenIDApplication into launchpad:master

Proposed by Simone Pelosi
Status: Merged
Approved by: Simone Pelosi
Approved revision: c94e6179897f843d186072f5964319a455bf411f
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pelpsi/launchpad:TestOpenIDApplication-does-not-fully-implement-ITestOpenIDApplication
Merge into: launchpad:master
Diff against target: 41 lines (+21/-1)
3 files modified
lib/lp/systemhomes.py (+2/-1)
lib/lp/testopenid/tests/__init__.py (+0/-0)
lib/lp/testopenid/tests/test_interfaces.py (+19/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+439260@code.launchpad.net

Commit message

TestOpenIDApplication does not fully implement ITestOpenIDApplication

Added test case to check the correct implementation of ITestOpenIDApplication and fixed TestOpenIDApplication class providing the attribute "title".

LP: #837229

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Colin Watson (cjwatson) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/systemhomes.py b/lib/lp/systemhomes.py
2index 12e0358..fc161ff 100644
3--- a/lib/lp/systemhomes.py
4+++ b/lib/lp/systemhomes.py
5@@ -357,4 +357,5 @@ class WebServiceApplication(ServiceRootResource):
6
7 @implementer(ITestOpenIDApplication)
8 class TestOpenIDApplication:
9- pass
10+
11+ title = "TestOpenIDApplication"
12diff --git a/lib/lp/testopenid/tests/__init__.py b/lib/lp/testopenid/tests/__init__.py
13new file mode 100644
14index 0000000..e69de29
15--- /dev/null
16+++ b/lib/lp/testopenid/tests/__init__.py
17diff --git a/lib/lp/testopenid/tests/test_interfaces.py b/lib/lp/testopenid/tests/test_interfaces.py
18new file mode 100644
19index 0000000..f4b544d
20--- /dev/null
21+++ b/lib/lp/testopenid/tests/test_interfaces.py
22@@ -0,0 +1,19 @@
23+# Copyright 2010-2018 Canonical Ltd. This software is licensed under the GNU
24+# Affero General Public License version 3 (see the file LICENSE).
25+
26+"""Test Interface implementations."""
27+
28+from zope.component import getUtility
29+
30+from lp.testing import TestCaseWithFactory, verifyObject
31+from lp.testing.layers import FunctionalLayer
32+from lp.testopenid.interfaces.server import ITestOpenIDApplication
33+
34+
35+class TestInterfaces(TestCaseWithFactory):
36+
37+ layer = FunctionalLayer
38+
39+ def test_ITestOpenIDApplication_implementation(self):
40+ test_open_app = getUtility(ITestOpenIDApplication)
41+ self.assertTrue(verifyObject(ITestOpenIDApplication, test_open_app))

Subscribers

People subscribed via source and target branches

to status/vote changes: