File: testapps.py

package info (click to toggle)
python-steamodd 5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 304 kB
  • sloc: python: 2,224; makefile: 162
file content (15 lines) | stat: -rw-r--r-- 458 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import unittest
from steam import apps

class AppsTestCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls._apps = apps.app_list()

    def test_builtin_consistency(self):
        for app, name in self._apps._builtin.items():
            self.assertIn(app, self._apps)
            self.assertEquals((app, name), self._apps[app])

    def test_invalid_app(self):
        self.assertRaises(KeyError, self._apps.__getitem__, 12345678)