OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is govered by a BSD-style |
| 3 # license that can be found in the LICENSE file or at |
| 4 # https://developers.google.com/open-source/licenses/bsd |
| 5 |
| 6 """Tests for artifactcollision module.""" |
| 7 |
| 8 import unittest |
| 9 |
| 10 from framework import artifactcollision |
| 11 from services import service_manager |
| 12 from testing import testing_helpers |
| 13 |
| 14 |
| 15 class ArtifactCollisionTest(unittest.TestCase): |
| 16 |
| 17 def setUp(self): |
| 18 self.services = service_manager.Services() |
| 19 self.servlet = artifactcollision.ArtifactCollision( |
| 20 'rerq', 'res', services=self.services) |
| 21 self.mr = testing_helpers.MakeMonorailRequest( |
| 22 params={'name': 'artifact'}, method='POST') |
| 23 self.mr.project_name = 'monorail' |
| 24 self.mr.continue_issue_id = '123' |
| 25 |
| 26 def testGatherPageData(self): |
| 27 page_data = self.servlet.GatherPageData(self.mr) |
| 28 self.assertEqual('artifact', page_data['artifact_name']) |
| 29 self.assertEqual('/p/monorail/issues/detail?id=123', |
| 30 page_data['artifact_detail_url']) |
OLD | NEW |