blob: 656e76dcb14653256f56a5ac739e91d4d403fcd6 [file] [log] [blame]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is govered by a BSD-style
# license that can be found in the LICENSE file or at
"""Unittests for the issueimport servlet."""
import unittest
from framework import permissions
from services import service_manager
from testing import testing_helpers
from tracker import issueimport
class IssueExportTest(unittest.TestCase):
def setUp(self): = service_manager.Services()
self.servlet = issueimport.IssueImport(
'req', 'res',
def testAssertBasePermission(self):
"""Only site admins can import issues."""
mr = testing_helpers.MakeMonorailRequest(
self.servlet.AssertBasePermission, mr)
mr.auth.user_pb.is_site_admin = True