248
248
bug_target.ubuntu_packages[0], force_local_path=True)
249
249
self.assertEqual(link, content.a['href'])
251
def test_ask_question_does_not_use_launchpad(self):
252
bug_target = self._makeBugTargetProduct(
253
bug_tracker='launchpad', packaging=True)
254
login_person(bug_target.owner)
255
bug_target.official_answers = False
256
view = create_initialized_view(
257
bug_target, '+bugs', principal=bug_target.owner)
258
self.assertEqual(None, view.addquestion_url)
260
def test_ask_question_uses_launchpad(self):
261
bug_target = self._makeBugTargetProduct(
262
bug_tracker='launchpad', packaging=True)
263
login_person(bug_target.owner)
264
bug_target.official_answers = True
265
view = create_initialized_view(
266
bug_target, '+bugs', principal=bug_target.owner)
268
bug_target, rootsite='answers', view_name='+addquestion')
269
self.assertEqual(url, view.addquestion_url)
252
272
class TestBugTaskSearchListingViewDSP(BugTargetTestCase):