9838.2.2
by Curtis Hovey
Added a test to verify the specification menus. Discovered that it had links to |
1 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
2 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
3 |
||
4 |
__metaclass__ = type |
|
5 |
||
6 |
from lp.blueprints.browser.specification import ( |
|
11403.1.4
by Henning Eggers
Reformatted imports using format-imports script r32. |
7 |
SpecificationActionMenu, |
8 |
SpecificationContextMenu, |
|
9 |
)
|
|
9838.2.2
by Curtis Hovey
Added a test to verify the specification menus. Discovered that it had links to |
10 |
from lp.testing import TestCaseWithFactory |
14612.2.1
by William Grant
format-imports on lib/. So many imports. |
11 |
from lp.testing.layers import DatabaseFunctionalLayer |
9838.2.2
by Curtis Hovey
Added a test to verify the specification menus. Discovered that it had links to |
12 |
from lp.testing.menu import check_menu_links |
13 |
||
14 |
||
15 |
class TestSpecificationMenus(TestCaseWithFactory): |
|
16 |
"""Test specification menus links."""
|
|
17 |
layer = DatabaseFunctionalLayer |
|
18 |
||
19 |
def setUp(self): |
|
20 |
TestCaseWithFactory.setUp(self) |
|
21 |
self.specification = self.factory.makeSpecification() |
|
22 |
||
23 |
def test_SpecificationContextMenu(self): |
|
24 |
menu = SpecificationContextMenu(self.specification) |
|
25 |
self.assertTrue(check_menu_links(menu)) |
|
26 |
||
9838.2.3
by Curtis Hovey
Created an action menu for specification. Fixed some lint issues, including a |
27 |
def test_SpecificationActionMenu(self): |
28 |
menu = SpecificationActionMenu(self.specification) |
|
29 |
self.assertTrue(check_menu_links(menu)) |