diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-11-18 20:57:55 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-11-18 20:57:55 +0100 |
commit | ea198d2439bc20994dd787a86e686e1baf8e1c9e (patch) | |
tree | 119aac36e481a6633b0f0ec505c24f8e0e67d9b9 | |
parent | 21999847be1af71e95c778b33c2ad2e83ab1a582 (diff) | |
download | ick2-ea198d2439bc20994dd787a86e686e1baf8e1c9e.tar.gz |
Refactor: move VersionAPI tests into their own module
-rw-r--r-- | ick2/controllerapi_tests.py | 17 | ||||
-rw-r--r-- | ick2/versionapi_tests.py | 36 | ||||
-rw-r--r-- | without-tests | 1 |
3 files changed, 36 insertions, 18 deletions
diff --git a/ick2/controllerapi_tests.py b/ick2/controllerapi_tests.py index ad638b6..53ded05 100644 --- a/ick2/controllerapi_tests.py +++ b/ick2/controllerapi_tests.py @@ -48,23 +48,6 @@ class ControllerAPITests(unittest.TestCase): self.assertTrue(os.path.exists(statedir)) -class VersionAPITests(unittest.TestCase): - - def create_api(self): - api = ick2.VersionAPI(None) - return api - - def test_returns_version_correcly(self): - api = ick2.VersionAPI(None) - response = api.get_version() - self.assertEqual( - response, - { - 'version': ick2.__version__, - } - ) - - class ProjectAPITests(unittest.TestCase): def setUp(self): diff --git a/ick2/versionapi_tests.py b/ick2/versionapi_tests.py new file mode 100644 index 0000000..500d7e6 --- /dev/null +++ b/ick2/versionapi_tests.py @@ -0,0 +1,36 @@ +# Copyright (C) 2017 Lars Wirzenius +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + + +import unittest + + +import ick2 + + +class VersionAPITests(unittest.TestCase): + + def create_api(self): + api = ick2.VersionAPI(None) + return api + + def test_returns_version_correcly(self): + api = ick2.VersionAPI(None) + response = api.get_version() + self.assertEqual( + response, + { + 'version': ick2.__version__, + } + ) diff --git a/without-tests b/without-tests index 35e54f5..61419a0 100644 --- a/without-tests +++ b/without-tests @@ -7,6 +7,5 @@ ick2/logging.py ick2/projectapi.py ick2/responses.py ick2/version.py -ick2/versionapi.py ick2/workapi.py ick2/workerapi.py |