aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/test_constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_constants.py')
-rw-r--r--tests/unit/test_constants.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/unit/test_constants.py b/tests/unit/test_constants.py
new file mode 100644
index 0000000..944abd8
--- /dev/null
+++ b/tests/unit/test_constants.py
@@ -0,0 +1,27 @@
+import io
+import unittest
+import contextlib
+
+from tpblite.models import constants
+
+
+class ConstantsTestCase(unittest.TestCase):
+
+ def test_categories(self):
+ self.assertEqual(constants.CATEGORIES.VIDEO.MOVIES, 201)
+
+ def test_printOptions_one(self):
+ sobj = io.StringIO()
+ with contextlib.redirect_stdout(sobj):
+ constants.ORDERS.NAME.printOptions()
+ self.assertEqual(sobj.getvalue(), 'DES\nASC\n')
+
+ def test_printOptions_two(self):
+ sobj = io.StringIO()
+ with contextlib.redirect_stdout(sobj):
+ constants.CATEGORIES.GAMES.printOptions()
+ self.assertEqual(
+ sobj.getvalue(),
+ 'ALL\nPC\nMAC\nPSX\nXBOX360\nWII\nHANDHELD\nIOS\nANDROID\nOTHER\n'
+ )
+ \ No newline at end of file