Input validation work and error handling
This commit is contained in:
1 parent
4e2520ee76
commit
554b7cc82c
20 files changed
+627
-96
No files matched your search
@@ -107,8 +107,10 @@ class MediaLibraryTest(unittest.TestCase):
|
||||
BEGIN SELECT RAISE(ABORT, 'Test failure'); END
|
||||
''')
|
||||
db.commit()
|
||||
with self.assertRaises(sqlite3.IntegrityError):
|
||||
self.client.post(f'/media/{second}/play')
|
||||
with self.assertLogs(self.app.logger, level='ERROR'):
|
||||
response = self.client.post(f'/media/{second}/play')
|
||||
self.assertEqual(response.status_code, 503)
|
||||
self.assertIn(b'database is unavailable', response.data)
|
||||
self.assert_active(first)
|
||||
|
||||
def test_status_matches_player_priority_and_changes(self):
|
||||
|
||||
Reference in new issue
Block a user