summaryrefslogtreecommitdiff
path: root/ick2/versionapi_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-11-18 20:57:55 +0100
committerLars Wirzenius <liw@liw.fi>2017-11-18 20:57:55 +0100
commitea198d2439bc20994dd787a86e686e1baf8e1c9e (patch)
tree119aac36e481a6633b0f0ec505c24f8e0e67d9b9 /ick2/versionapi_tests.py
parent21999847be1af71e95c778b33c2ad2e83ab1a582 (diff)
downloadick2-ea198d2439bc20994dd787a86e686e1baf8e1c9e.tar.gz
Refactor: move VersionAPI tests into their own module
Diffstat (limited to 'ick2/versionapi_tests.py')
-rw-r--r--ick2/versionapi_tests.py36
1 files changed, 36 insertions, 0 deletions
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__,
+ }
+ )