def test_validate_all_flavors_valid(self): try: track1 = GChauppauge({'path': '/tmp', 'flavor': 'presentation'}) track2 = GChauppauge({'path': '/tmp', 'flavor': 'presenter'}) track3 = GChauppauge({'path': '/tmp', 'flavor': 'other'}) except SystemError: pass self.assertEqual(track1.options['flavor'], 'presentation') self.assertEqual(track2.options['flavor'], 'presenter') self.assertEqual(track3.options['flavor'], 'other')
def test_validate_flavor_not_valid(self): try: track = GChauppauge({'path': '/tmp', 'flavor': 'presentacion'}) except SystemError: return True #Force fail on test self.assertEqual(track.options['flavor'], 'fail')
def test_validate_boolean_valid(self): try: track = GChauppauge({'path': '/tmp', 'player': "fALse"}) except SystemError: return True #Force fail on test self.assertEqual(track.options['player'], False)