~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/tests/test_person_view.py

[r=danilo][bug=878260] macro
        bugtarget-macros-search/simple-search-form: Show a title;
        drop the 'order by' widget; CSS changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1067
1067
            self.assertEqual(expected, view.getMilestoneWidgetValues())
1068
1068
        self.assertThat(recorder, HasQueryCount(LessThan(3)))
1069
1069
 
 
1070
    def test_context_description(self):
 
1071
        # view.context_description returns a string that can be used
 
1072
        # in texts like "Bugs in $context_descirption"
 
1073
        view = create_initialized_view(self.person, self.view_name)
 
1074
        self.assertEqual(
 
1075
            self.expected_context_description % self.person.displayname,
 
1076
            view.context_description)
 
1077
 
1070
1078
 
1071
1079
class TestPersonRelatedBugTaskSearchListingView(
1072
1080
    BugTaskViewsTestBase, TestCaseWithFactory):
1073
1081
    """Tests for PersonRelatedBugTaskSearchListingView."""
1074
1082
 
1075
1083
    view_name = '+bugs'
 
1084
    expected_context_description = 'related to %s'
1076
1085
 
1077
1086
    def setUp(self):
1078
1087
        super(TestPersonRelatedBugTaskSearchListingView, self).setUp()
1089
1098
    """Tests for PersonAssignedBugTaskSearchListingView."""
1090
1099
 
1091
1100
    view_name = '+assignedbugs'
 
1101
    expected_context_description = 'assigned to %s'
1092
1102
 
1093
1103
    def setUp(self):
1094
1104
        super(TestPersonAssignedBugTaskSearchListingView, self).setUp()
1102
1112
    """Tests for PersonAssignedBugTaskSearchListingView."""
1103
1113
 
1104
1114
    view_name = '+commentedbugs'
 
1115
    expected_context_description = 'commented on by %s'
1105
1116
 
1106
1117
    def setUp(self):
1107
1118
        super(TestPersonCommentedBugTaskSearchListingView, self).setUp()
1115
1126
    """Tests for PersonAssignedBugTaskSearchListingView."""
1116
1127
 
1117
1128
    view_name = '+reportedbugs'
 
1129
    expected_context_description = 'reported by %s'
1118
1130
 
1119
1131
    def setUp(self):
1120
1132
        super(TestPersonReportedBugTaskSearchListingView, self).setUp()
1128
1140
    """Tests for PersonAssignedBugTaskSearchListingView."""
1129
1141
 
1130
1142
    view_name = '+subscribedbugs'
 
1143
    expected_context_description = '%s is subscribed to'
1131
1144
 
1132
1145
    def setUp(self):
1133
1146
        super(TestPersonSubscribedBugTaskSearchListingView, self).setUp()
1142
1155
    """Tests for PersonAffectingBugTaskSearchListingView."""
1143
1156
 
1144
1157
    view_name = '+affectingbugs'
 
1158
    expected_context_description = 'affecting %s'
1145
1159
 
1146
1160
    def setUp(self):
1147
1161
        super(TestPersonAffectingBugTaskSearchListingView, self).setUp()