def test_volume_up(self): url = "/volume/up" prev_vol = test_utils.get_volume()[0] self.assertLess(prev_vol, 100, "Please start the test with volume in 50%") rv = test_app.get(url) self.assertTrue(rv.status_code in valid_codes, "Wrong return code. Code was : " + str(rv.status_code)) self.assertGreater(test_utils.get_volume()[0], prev_vol)
def test_volume_off(self): url = "/volume/off" self.assertEqual(test_utils.get_volume()[1], "on", "Please start the test with volume turned on") rv = test_app.get(url) self.assertTrue(rv.status_code in valid_codes, "Wrong return code. Code was : " + str(rv.status_code)) self.assertEqual(test_utils.get_volume()[1], "off")