Plex plugin to to play various online streams (mostly Latvian).

testsentinel.py 976B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (C) 2007-2012 Michael Foord & the mock team
  2. # E-mail: fuzzyman AT voidspace DOT org DOT uk
  3. # http://www.voidspace.org.uk/python/mock/
  4. import unittest2 as unittest
  5. from mock import sentinel, DEFAULT
  6. class SentinelTest(unittest.TestCase):
  7. def testSentinels(self):
  8. self.assertEqual(sentinel.whatever, sentinel.whatever,
  9. 'sentinel not stored')
  10. self.assertNotEqual(sentinel.whatever, sentinel.whateverelse,
  11. 'sentinel should be unique')
  12. def testSentinelName(self):
  13. self.assertEqual(str(sentinel.whatever), 'sentinel.whatever',
  14. 'sentinel name incorrect')
  15. def testDEFAULT(self):
  16. self.assertIs(DEFAULT, sentinel.DEFAULT)
  17. def testBases(self):
  18. # If this doesn't raise an AttributeError then help(mock) is broken
  19. self.assertRaises(AttributeError, lambda: sentinel.__bases__)
  20. if __name__ == '__main__':
  21. unittest.main()