| Line | |
|---|
| 1 | # -*- coding: utf-8 -*- |
|---|
| 2 | # |
|---|
| 3 | # Copyright (C) 2011 Odd Simon Simonsen <oddsimons@gmail.com> |
|---|
| 4 | # Copyright (C) 2012 Steffen Hoffmann <hoff.st@web.de> |
|---|
| 5 | # |
|---|
| 6 | # This software is licensed as described in the file COPYING, which |
|---|
| 7 | # you should have received as part of this distribution. |
|---|
| 8 | # |
|---|
| 9 | |
|---|
| 10 | import shutil |
|---|
| 11 | import tempfile |
|---|
| 12 | import unittest |
|---|
| 13 | |
|---|
| 14 | from trac.test import EnvironmentStub |
|---|
| 15 | |
|---|
| 16 | from tractags.admin import TagChangeAdminPanel |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | class TagChangeAdminPanelTestCase(unittest.TestCase): |
|---|
| 20 | |
|---|
| 21 | def setUp(self): |
|---|
| 22 | self.env = EnvironmentStub(enable=['trac.*', 'tractags.*']) |
|---|
| 23 | self.env.path = tempfile.mkdtemp() |
|---|
| 24 | |
|---|
| 25 | self.tag_cap = TagChangeAdminPanel(self.env) |
|---|
| 26 | |
|---|
| 27 | def tearDown(self): |
|---|
| 28 | shutil.rmtree(self.env.path) |
|---|
| 29 | |
|---|
| 30 | def test_init(self): |
|---|
| 31 | # Empty test just to confirm that setUp and tearDown works |
|---|
| 32 | pass |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | def test_suite(): |
|---|
| 36 | suite = unittest.TestSuite() |
|---|
| 37 | suite.addTest(unittest.makeSuite(TagChangeAdminPanelTestCase)) |
|---|
| 38 | return suite |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | if __name__ == '__main__': |
|---|
| 42 | unittest.main(defaultTest='test_suite') |
|---|
Note: See
TracBrowser
for help on using the repository browser.